summaryrefslogtreecommitdiff
path: root/src/irmd/oap
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/oap')
-rw-r--r--src/irmd/oap/auth.c10
-rw-r--r--src/irmd/oap/cli.c2
-rw-r--r--src/irmd/oap/io.c6
-rw-r--r--src/irmd/oap/tests/common.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/src/irmd/oap/auth.c b/src/irmd/oap/auth.c
index 1e39cae6..29e8b4d6 100644
--- a/src/irmd/oap/auth.c
+++ b/src/irmd/oap/auth.c
@@ -268,7 +268,7 @@ int oap_auth_peer(char * name,
}
if (peer_hdr->crt.len == 0) {
- if (cfg->req_auth) {
+ if (cfg->a.req) {
log_err_id(id, "Peer did not provide a certificate.");
goto fail_check;
}
@@ -291,16 +291,16 @@ int oap_auth_peer(char * name,
log_dbg_id(id, "Got public key from crt.");
- if (cfg->cacert[0] != '\0' &&
- crypt_load_crt_file(cfg->cacert, &pin) < 0) {
- log_err_id(id, "Failed to load pinned CA %s.", cfg->cacert);
+ if (cfg->a.cacert[0] != '\0' &&
+ crypt_load_crt_file(cfg->a.cacert, &pin) < 0) {
+ log_err_id(id, "Failed to load pinned CA %s.", cfg->a.cacert);
goto fail_crt;
}
ret = auth_verify_crt_pin(oap_auth.ca_ctx, crt, pin);
if (ret == -ENOENT) {
log_err_id(id, "Peer crt not issued by pinned CA %s.",
- cfg->cacert);
+ cfg->a.cacert);
goto fail_pin;
}
diff --git a/src/irmd/oap/cli.c b/src/irmd/oap/cli.c
index b3d6d586..2a57d12e 100644
--- a/src/irmd/oap/cli.c
+++ b/src/irmd/oap/cli.c
@@ -96,7 +96,7 @@ int load_cli_kex_config(const struct name_info * info,
memset(cfg, 0, sizeof(*cfg));
/* A client authenticates the server by default, like an https client */
- cfg->req_auth = OAP_CLIENT_AUTH_DEFAULT;
+ cfg->a.req = OAP_CLIENT_AUTH_DEFAULT;
return load_kex_config(info->name, info->c.sec, cfg);
}
diff --git a/src/irmd/oap/io.c b/src/irmd/oap/io.c
index 7b661435..dc71fe9e 100644
--- a/src/irmd/oap/io.c
+++ b/src/irmd/oap/io.c
@@ -120,10 +120,10 @@ int load_kex_config(const char * name,
return -1;
}
- if (cfg->cacert[0] != '\0') {
- if (crypt_load_crt_file(cfg->cacert, &pin) < 0) {
+ if (cfg->a.cacert[0] != '\0') {
+ if (crypt_load_crt_file(cfg->a.cacert, &pin) < 0) {
log_err("Failed to load pinned CA %s for %s.",
- cfg->cacert, name);
+ cfg->a.cacert, name);
return -EAUTH;
}
crypt_free_crt(pin);
diff --git a/src/irmd/oap/tests/common.c b/src/irmd/oap/tests/common.c
index af815fd4..8c271b2e 100644
--- a/src/irmd/oap/tests/common.c
+++ b/src/irmd/oap/tests/common.c
@@ -36,9 +36,9 @@ int load_srv_kex_config(const struct name_info * info,
memset(cfg, 0, sizeof(*cfg));
- cfg->req_auth = test_cfg.srv.req_auth;
+ cfg->a.req = test_cfg.srv.req_auth;
if (test_cfg.srv.cacert != NULL)
- strcpy(cfg->cacert, test_cfg.srv.cacert);
+ strcpy(cfg->a.cacert, test_cfg.srv.cacert);
/* Digest is kept without kex, as in parse_sec_config */
SET_KEX_DIGEST_NID(cfg, test_cfg.srv.md);
@@ -61,9 +61,9 @@ int load_cli_kex_config(const struct name_info * info,
memset(cfg, 0, sizeof(*cfg));
- cfg->req_auth = test_cfg.cli.req_auth;
+ cfg->a.req = test_cfg.cli.req_auth;
if (test_cfg.cli.cacert != NULL)
- strcpy(cfg->cacert, test_cfg.cli.cacert);
+ strcpy(cfg->a.cacert, test_cfg.cli.cacert);
/* Digest is kept without kex, as in parse_sec_config */
SET_KEX_DIGEST_NID(cfg, test_cfg.cli.md);