From 4405a2cc6a62138a57ad663ae44f941e4f739cfb Mon Sep 17 00:00:00 2001 From: "Steffen \"Daode\" Nurpmeso" Date: Tue, 31 Dec 2013 14:17:19 +0100 Subject: [PATCH] openssl:ssl_certificate(): fix *ssl-key-user@host* (broken since ever) --- openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openssl.c b/openssl.c index 7fea9bf7..2786fbc9 100644 --- a/openssl.c +++ b/openssl.c @@ -285,7 +285,8 @@ ssl_certificate(struct sock *sp, const char *uhp) } else if (SSL_CTX_use_certificate_chain_file(sp->s_ctx, cert) == 1) { keyvar = ac_alloc(strlen(uhp) + 9); - strcpy(keyvar, "ssl-key-"); + memcpy(keyvar, "ssl-key-", 8); + memcpy(keyvar + 8, uhp, i + 1); if ((key = value(keyvar)) == NULL && (key = value("ssl-key")) == NULL) key = cert; -- 2.11.4.GIT