summaryrefslogtreecommitdiff
path: root/p11p-daemon/src
Commit message (Collapse)AuthorAgeFilesLines
* Be consistent with version numberHEADmasterLinus Nordberg2020-02-191-1/+1
|
* Sane default path to p11-kit-remoteLinus Nordberg2020-02-191-1/+1
| | | | This is where the Debian package installs it.
* Make the $PID part of socket names configurableLinus Nordberg2020-02-172-1/+21
|
* Make socket base path configurableLinus Nordberg2020-02-172-10/+25
|
* Fix a bug in balance config settingsLinus Nordberg2020-02-141-2/+2
|
* better balance settingsLinus Nordberg2020-02-143-21/+16
|
* Make probability of dropping a request, for testing, configurableLinus Nordberg2020-02-142-7/+27
|
* Some more documentation and cosmetic changesLinus Nordberg2020-02-113-99/+133
|
* WIP track p11 state and shortcut responses when neededLinus Nordberg2020-02-115-40/+149
|
* WIP parts from transparent-failover + half baked toml configdevelLinus Nordberg2020-02-106-219/+547
| | | | | | | | | | | | The transparent failover experiment, see branch transparent-failover, resulted in a bunch of changes that we want regardless of failover implementation. This commit incorporates these. This commit also has a half baked implementation of TOML file based configuration, to not expose the operator for Erlang syntax when configuring the daemon. TODO: sort this out!
* Rename remote -> clientLinus Nordberg2020-01-105-118/+114
| | | | Also rename token -> vtoken where appropriate.
* Verify RPC versionLinus Nordberg2020-01-093-61/+96
| | | | | | | | | | Don't just forward the version octet, verify it and refuse other protocol versions. Send it once in each direction and don't count on the misconception that new client means new remote, or vice versa. Especially the latter, that a new remote means new client, will be untrue as soon as we implement failover.
* Code cleanup, variable renamingLinus Nordberg2020-01-077-156/+167
| | | | | | | | Move away from func(Foo) -> NewFoo = something(Foo) and instead use FooIn and Foo, or something else that makes sense.
* Servers don't need to know socket pathLinus Nordberg2020-01-072-12/+14
|
* Set up environment for remotes according to configurationLinus Nordberg2020-01-073-18/+38
|
* 0.2.0-devLinus Nordberg2019-10-091-1/+1
|
* p11p-0.1.0p11p-0.1.0Linus Nordberg2019-07-021-1/+1
|
* add copyright and license info headersLinus Nordberg2019-07-0210-0/+30
|
* improve that commentLinus Nordberg2019-07-021-1/+1
|
* get rid of hardcoded EUIDLinus Nordberg2019-07-021-2/+5
|
* move path to p11-kit-remote properlyLinus Nordberg2019-07-021-5/+3
|
* move path to p11-kit-remote to configLinus Nordberg2019-07-022-2/+10
|
* implement load balancingLinus Nordberg2019-07-024-35/+84
|
* clarify that return value from terminate/2 is ignoredLinus Nordberg2019-07-011-3/+3
|
* stop server with reason normalLinus Nordberg2019-07-011-1/+1
| | | | | | I'm starting to think that 'shutdown' means that we're shutting down the application. Anyhow, we're not using this information, other than for debug printouts, which we can do explicitly instead.
* go back to lists:mapLinus Nordberg2019-07-011-4/+5
| | | | | I think it makes sense using map/2 when changing a list, like here, and use list comprehensions when filtering and bulding _other_ lists.
* add outcommented code for testing remote timeoutsLinus Nordberg2019-07-011-0/+9
|
* make events casts instead of calls; ask remotes to stop themselvesLinus Nordberg2019-07-012-23/+35
| | | | | | | casts bc don't risk blocking avoiding gen_server:stop/1 so that we terminate processes which we are not sure are alive
* commentLinus Nordberg2019-07-011-1/+1
|
* when a remote times out, hang up its p11 clientLinus Nordberg2019-07-011-2/+2
| | | | | 7db7c1d ("remove some FIXME:s") contained more than what the commit message says. Needs this too.
* remove some FIXME:sLinus Nordberg2019-07-014-8/+9
|
* add 'mode' to token configLinus Nordberg2019-07-011-3/+16
|
* rename client/server "change" -> "event"Linus Nordberg2019-07-013-10/+10
|
* document the manager a bit moreLinus Nordberg2019-07-011-7/+19
|
* use a list comprehension in the place of lists:map/2Linus Nordberg2019-06-301-5/+4
| | | | | | | | map/2 does _not_ risk reordering the list. The comment "The evaluation order depends on the implementation." in the documentation refers only to in which order fun is applied. A list comprehension looks a little bit nicer though, IMO.
* rename manager functions to reflect where the policy livesLinus Nordberg2019-06-303-11/+11
| | | | | | Servers and remotes (soon renamed "clients") are not the ones implementing policy. They should therefore report events to the manager which then imposes policy.
* at p11 client disconnect, server asks manager to kill remoteLinus Nordberg2019-06-303-18/+34
| | | | | | | | Also, comment out all debug printouts reporting about octets sent and received, all four types. Missing: Switching remote behind the back of the p11 client, including replaying whatever needs to be replayed.
* start remotes on demand rather than at manager startupLinus Nordberg2019-06-302-36/+55
| | | | | | | Also, rotate list of remotes on remote timeout. Still missing: When a remote times out, switch remote under the feet of the client.
* make p11p_server:reply/2 a call tooLinus Nordberg2019-06-302-12/+12
|
* turn most cast's into call's, for more synchronisityLinus Nordberg2019-06-303-20/+30
|
* parse rpc replies and timeout if they're not on timeLinus Nordberg2019-06-282-18/+42
| | | | | | | | | | | | | | | | | Not that it works though, demonstrated thanks to our attempts at reusing a remote for a new client which is sending that version byte before the rpc message. At least I think that's why. Seems like send (to remote) is blocking and therefore the timeout can't fire (same process). First things is that the timeout should probably be in the server instead, in case the remote is blocking like in this case. Second is that we'd at least seen something if the server was calling the remote genserver instead of casting, du to the default gen_server:call timeout of 5s. Why are we casting in the first place? Well, we had to back when we didn't collect the full rpc message before passing it on. That could change now.
* don't send that version octet by itselfLinus Nordberg2019-06-284-34/+40
| | | | Instead, add it to new remote outbuf.
* parse rpc requests and don't send until we've got a full requestLinus Nordberg2019-06-281-14/+30
|
* serialise rpcLinus Nordberg2019-06-281-2/+10
|
* prepend debug printouts with own pidLinus Nordberg2019-06-281-10/+7
|
* first rought cut of an rpc parserLinus Nordberg2019-06-282-0/+173
|
* add a genserver for handling remotes and start forwarding dataLinus Nordberg2019-06-274-45/+158
| | | | | | | | | | Current status is that p11tool successfully performs a --list-tokens request over p11p, yay! Only once though -- the next request hangs. heh. Also, the timeout logic is wrong and should move to the server, measuring the time it takes to get a full p11 response. This reqires parsing of the p11-kit rpc protocol, which we need anyway.
* typeLinus Nordberg2019-06-271-1/+1
|
* add remote manager, fork+execing p11-kit-remote processesLinus Nordberg2019-06-263-6/+104
|
* keep tokens and their modules in mapsLinus Nordberg2019-06-262-38/+73
| | | | | | For convenient lookup by name. Not the most storage efficient, and maybe proplists would be better suited. Learning maps is useful though.