mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
tls: mbedtls-3.5.0: correct privkey size
This commit is contained in:
parent
6dfc270232
commit
75b41f4a9d
1 changed files with 5 additions and 0 deletions
|
@ -761,8 +761,13 @@ int pkey_pm_load(EVP_PKEY *pk, const unsigned char *buffer, int len)
|
|||
mbedtls_pk_init(pkey_pm->pkey);
|
||||
|
||||
#if defined(MBEDTLS_VERSION_NUMBER) && MBEDTLS_VERSION_NUMBER >= 0x03000000
|
||||
#if defined(MBEDTLS_VERSION_NUMBER) && MBEDTLS_VERSION_NUMBER >= 0x03050000
|
||||
ret = mbedtls_pk_parse_key(pkey_pm->pkey, load_buf, (unsigned int)len, NULL, 0,
|
||||
mbedtls_ctr_drbg_random, pkey_pm->rngctx);
|
||||
#else
|
||||
ret = mbedtls_pk_parse_key(pkey_pm->pkey, load_buf, (unsigned int)len + 1, NULL, 0,
|
||||
mbedtls_ctr_drbg_random, pkey_pm->rngctx);
|
||||
#endif
|
||||
#else
|
||||
ret = mbedtls_pk_parse_key(pkey_pm->pkey, load_buf, (unsigned int)len + 1, NULL, 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue