summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/ca.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-05-02 13:15:25 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-05-02 13:15:25 +0000
commit87baf5bd51838b0b742f2d6679ae7176b341104c (patch)
tree56e2e8fabef6bd1696e85e44122b2cca6520613b /usr.sbin/relayd/ca.c
parent7779b5e91b95097419ac00c882d2b00d525e6117 (diff)
Fix obvious problems with relayd config reload.
- fix a TAILQ corruption because of a use after free - do not reinit the SSL engine since that fails OK sthen, benno
Diffstat (limited to 'usr.sbin/relayd/ca.c')
-rw-r--r--usr.sbin/relayd/ca.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/relayd/ca.c b/usr.sbin/relayd/ca.c
index 0b79b62f75b..81f9971771d 100644
--- a/usr.sbin/relayd/ca.c
+++ b/usr.sbin/relayd/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.12 2015/01/22 17:42:09 reyk Exp $ */
+/* $OpenBSD: ca.c,v 1.13 2015/05/02 13:15:24 claudio Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -417,12 +417,15 @@ rsae_keygen(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb)
void
ca_engine_init(struct relayd *x_env)
{
- ENGINE *e;
+ ENGINE *e = NULL;
const char *errstr, *name;
if (env == NULL)
env = x_env;
+ if (rsa_default != NULL)
+ return;
+
if ((e = ENGINE_get_default_RSA()) == NULL) {
if ((e = ENGINE_new()) == NULL) {
errstr = "ENGINE_new";