summaryrefslogtreecommitdiff
path: root/src/irmd/oap
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/oap')
-rw-r--r--src/irmd/oap/io.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/irmd/oap/io.c b/src/irmd/oap/io.c
index dc71fe9e..143ae65e 100644
--- a/src/irmd/oap/io.c
+++ b/src/irmd/oap/io.c
@@ -140,8 +140,13 @@ int load_kex_config(const char * name,
return -ENOTSUP;
}
#endif
- if (cfg->c.nid == NID_undef) {
- log_err("Invalid cipher for %s.", name);
+ if (crypt_kex_rank(cfg->x.nid) < 1) {
+ log_err("Key exchange not supported for %s.", name);
+ return -ENOTSUP;
+ }
+
+ if (crypt_cipher_rank(cfg->c.nid) < 1) {
+ log_err("Cipher not supported for %s.", name);
return -ECRYPT;
}