summaryrefslogtreecommitdiff
path: root/src/irmd/oap/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/oap/io.c')
-rw-r--r--src/irmd/oap/io.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/irmd/oap/io.c b/src/irmd/oap/io.c
index e4189d4d..8f75a8d8 100644
--- a/src/irmd/oap/io.c
+++ b/src/irmd/oap/io.c
@@ -118,9 +118,15 @@ int load_kex_config(const char * name,
log_info("Key exchange not configured for %s.", name);
return 0;
}
-
- if (cfg->c.nid == NID_undef || crypt_nid_to_str(cfg->c.nid) == NULL) {
- log_err("Invalid cipher NID %d for %s.", cfg->c.nid, name);
+#ifndef HAVE_OPENSSL_PQC
+ if (IS_KEM_ALGORITHM(cfg->x.str)) {
+ log_err("PQC not available, can't use %s for %s.",
+ cfg->x.str, name);
+ return -ENOTSUP;
+ }
+#endif
+ if (cfg->c.nid == NID_undef) {
+ log_err("Invalid cipher for %s.", name);
return -ECRYPT;
}