diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ssl_mbedtls.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ssl_mbedtls.cc b/src/ssl_mbedtls.cc index 1b3e350..75a624b 100644 --- a/src/ssl_mbedtls.cc +++ b/src/ssl_mbedtls.cc @@ -556,6 +556,11 @@ bool SSLCert::generate(Logger* logger, SSLEntropy* entropy, if (issuer_key) { mbedtls_x509write_crt_set_issuer_key( &crt, static_cast<SSLKeyImpl*>(issuer_key)->key()); + } else if (key) { + // Without an issuer_key mbedtls_x509write_crt_pem always fails because + // it uses the type of the issuer_key to figure out signature algo + mbedtls_x509write_crt_set_issuer_key( + &crt, static_cast<SSLKeyImpl*>(key)->key()); } subject = "CN=" + host; |
