diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-24 23:02:07 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-24 23:02:07 +0200 |
| commit | 5540079928fd36e656becdbaff7e44138a647ede (patch) | |
| tree | 1782e09c8bd5b60ca4a024426d650d44a8eb3513 /src/ssl_mbedtls.cc | |
| parent | de956430256a2a670fb3af88481661fc9507e2e8 (diff) | |
Fix mbedtls certificate generation
And improve configure detction for mbedtls by listing other libraries
Diffstat (limited to 'src/ssl_mbedtls.cc')
| -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; |
