diff options
Diffstat (limited to 'vchat-tls.c')
-rwxr-xr-x | vchat-tls.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vchat-tls.c b/vchat-tls.c index c4b014a..dbfd927 100755 --- a/vchat-tls.c +++ b/vchat-tls.c | |||
@@ -481,12 +481,11 @@ int vc_tls_connect( int serverfd, vc_x509store_t *vc_store ) | |||
481 | char *password = NULL; | 481 | char *password = NULL; |
482 | char password_buf[1024]; | 482 | char password_buf[1024]; |
483 | while (1) { | 483 | while (1) { |
484 | #if MBEDTLS_SSL_MAJOR_VERSION_3 < 3 | 484 | ret = mbedtls_pk_parse_keyfile(&s->_key, vc_store->keyfile, password |
485 | ret = mbedtls_pk_parse_keyfile(&s->_key, vc_store->keyfile, password); | 485 | #if MBEDTLS_SSL_MAJOR_VERSION_3 >= 3 |
486 | #else | 486 | , mbedtls_ctr_drbg_random, &s->_ctr_drbg |
487 | // ret = fprintf(stderr, "ERROR: %d\n", mbedtls_pk_parse_keyfile(&s->_key, vc_store->keyfile, password, mbedtls_ctr_drbg_random, &s->_ctr_drbg)); | ||
488 | ret = mbedtls_pk_parse_keyfile(&s->_key, vc_store->keyfile, password, mbedtls_ctr_drbg_random, &s->_ctr_drbg); | ||
489 | #endif | 487 | #endif |
488 | ); | ||
490 | if (!ret) | 489 | if (!ret) |
491 | break; | 490 | break; |
492 | if (ret != MBEDTLS_ERR_PK_PASSWORD_REQUIRED && ret != MBEDTLS_ERR_PK_PASSWORD_MISMATCH) { | 491 | if (ret != MBEDTLS_ERR_PK_PASSWORD_REQUIRED && ret != MBEDTLS_ERR_PK_PASSWORD_MISMATCH) { |