summaryrefslogtreecommitdiff
path: root/src/irmd/oap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/oap.h')
-rw-r--r--src/irmd/oap.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/irmd/oap.h b/src/irmd/oap.h
index 86f11e21..e9d7511b 100644
--- a/src/irmd/oap.h
+++ b/src/irmd/oap.h
@@ -40,21 +40,21 @@ int oap_auth_add_ca_crt(void * crt);
int oap_auth_add_chain_crt(void * crt);
/*
-* Prepare OAP request header for server, returns context
-* Passes client data for srv, returns srv data for client
-* rekey forces ephemeral server-encap KEX (no client-encap; preserves FS/PCS)
-*/
+ * Prepares the request header and returns the context. info holds the
+ * credentials we present, peer the name the server certificate must
+ * carry (NULL expects info->name); rekey forces an ephemeral KEX.
+ */
int oap_cli_prepare(void ** ctx,
const struct name_info * info,
+ const char * peer,
buffer_t * req_buf,
buffer_t data,
bool rekey);
/*
- * Server processes header, creates response header, returns secret key.
- * data is in/out: input=srv data to send, output=cli data received.
- * rekey drops the cert and verifies against cached_crt; peer_crt (or NULL)
- * receives a copy of the peer cert to cache at the initial handshake.
+ * Answers the request header and returns the secret key. data is
+ * in/out; rekey verifies against cached_crt, and peer_crt takes a copy
+ * of the peer cert to cache at the initial handshake.
*/
int oap_srv_process(const struct name_info * info,
buffer_t req_buf,
@@ -70,13 +70,12 @@ int oap_srv_process(const struct name_info * info,
* cached_crt verifies a cert-less re-key; peer_crt (or NULL) receives a
* copy of the peer cert to cache at the initial handshake.
*/
-int oap_cli_complete(void * ctx,
- const struct name_info * info,
- buffer_t rsp_buf,
- buffer_t * data,
- struct crypt_sk * sk,
- const buffer_t * cached_crt,
- buffer_t * peer_crt);
+int oap_cli_complete(void * ctx,
+ buffer_t rsp_buf,
+ buffer_t * data,
+ struct crypt_sk * sk,
+ const buffer_t * cached_crt,
+ buffer_t * peer_crt);
/* Free OAP state (on failure before complete) */
void oap_ctx_free(void * ctx);