Skip to content

Commit 37fe739

Browse files
committed
[mod_mbedtls] EC certs require drbg init
EC certs require drbg init with mbedtls >= 3.0.0 in addition to MBEDTLS_USE_PSA_CRYPTO requiring drbg init x-ref: "mbedtls error with ec certificates" https://redmine.lighttpd.net/boards/2/topics/12097 "mod_mbedtls: ECDSA OpenSSL certificates do not work with lighttpd + mbedTLS/PSA (MBEDTLS_USE_PSA_CRYPTO)" https://redmine.lighttpd.net/issues/3288
1 parent dc1d44e commit 37fe739

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mod_mbedtls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ __attribute_noinline__
12471247
static void *
12481248
network_mbedtls_load_pemfile (server *srv, const buffer *pemfile, const buffer *privkey)
12491249
{
1250-
#if defined(MBEDTLS_USE_PSA_CRYPTO)
1250+
#if MBEDTLS_VERSION_NUMBER >= 0x03000000 /* mbedtls 3.0.0 */
12511251
if (!mod_mbedtls_init_once_mbedtls(srv))
12521252
return NULL;
12531253
#endif
@@ -2138,7 +2138,7 @@ SETDEFAULTS_FUNC(mod_mbedtls_set_defaults)
21382138
__attribute_fallthrough__
21392139
case 2: /* ssl.ca-file */
21402140
case 3: /* ssl.ca-dn-file */
2141-
#if defined(MBEDTLS_USE_PSA_CRYPTO)
2141+
#if MBEDTLS_VERSION_NUMBER >= 0x03000000 /* mbedtls 3.0.0 */
21422142
if (!mod_mbedtls_init_once_mbedtls(srv)) return HANDLER_ERROR;
21432143
#endif /* else defer; not necessary for pemfile parsing */
21442144
if (!buffer_is_blank(cpv->v.b)) {

0 commit comments

Comments
 (0)