Skip to content

Commit 48d1c14

Browse files
authored
Merge pull request #10037 from bjwtaylor/remove-rng-parameters-from-pk
Remove rng parameters from PK and X.509
2 parents b90a16d + 3b11f41 commit 48d1c14

28 files changed

+84
-162
lines changed

include/mbedtls/x509_crt.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,17 +1140,11 @@ void mbedtls_x509write_crt_free(mbedtls_x509write_cert *ctx);
11401140
* \param ctx certificate to write away
11411141
* \param buf buffer to write to
11421142
* \param size size of the buffer
1143-
* \param f_rng RNG function. This must not be \c NULL.
1144-
* \param p_rng RNG parameter
11451143
*
11461144
* \return length of data written if successful, or a specific
11471145
* error code
1148-
*
1149-
* \note \p f_rng is used for the signature operation.
11501146
*/
1151-
int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size,
1152-
int (*f_rng)(void *, unsigned char *, size_t),
1153-
void *p_rng);
1147+
int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size);
11541148

11551149
#if defined(MBEDTLS_PEM_WRITE_C)
11561150
/**
@@ -1159,16 +1153,11 @@ int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx, unsigned char *buf, s
11591153
* \param ctx certificate to write away
11601154
* \param buf buffer to write to
11611155
* \param size size of the buffer
1162-
* \param f_rng RNG function. This must not be \c NULL.
1163-
* \param p_rng RNG parameter
11641156
*
11651157
* \return 0 if successful, or a specific error code
11661158
*
1167-
* \note \p f_rng is used for the signature operation.
11681159
*/
1169-
int mbedtls_x509write_crt_pem(mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size,
1170-
int (*f_rng)(void *, unsigned char *, size_t),
1171-
void *p_rng);
1160+
int mbedtls_x509write_crt_pem(mbedtls_x509write_cert *ctx, unsigned char *buf, size_t size);
11721161
#endif /* MBEDTLS_PEM_WRITE_C */
11731162
#endif /* MBEDTLS_X509_CRT_WRITE_C */
11741163

include/mbedtls/x509_csr.h

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,17 +337,12 @@ void mbedtls_x509write_csr_free(mbedtls_x509write_csr *ctx);
337337
* \param ctx CSR to write away
338338
* \param buf buffer to write to
339339
* \param size size of the buffer
340-
* \param f_rng RNG function. This must not be \c NULL.
341-
* \param p_rng RNG parameter
342340
*
343341
* \return length of data written if successful, or a specific
344342
* error code
345343
*
346-
* \note \p f_rng is used for the signature operation.
347344
*/
348-
int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
349-
int (*f_rng)(void *, unsigned char *, size_t),
350-
void *p_rng);
345+
int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size);
351346

352347
#if defined(MBEDTLS_PEM_WRITE_C)
353348
/**
@@ -357,16 +352,11 @@ int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf, si
357352
* \param ctx CSR to write away
358353
* \param buf buffer to write to
359354
* \param size size of the buffer
360-
* \param f_rng RNG function. This must not be \c NULL.
361-
* \param p_rng RNG parameter
362355
*
363356
* \return 0 if successful, or a specific error code
364357
*
365-
* \note \p f_rng is used for the signature operation.
366358
*/
367-
int mbedtls_x509write_csr_pem(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
368-
int (*f_rng)(void *, unsigned char *, size_t),
369-
void *p_rng);
359+
int mbedtls_x509write_csr_pem(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size);
370360
#endif /* MBEDTLS_PEM_WRITE_C */
371361
#endif /* MBEDTLS_X509_CSR_WRITE_C */
372362

library/ssl_tls12_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2827,7 +2827,7 @@ static int ssl_write_certificate_verify(mbedtls_ssl_context *ssl)
28272827
ssl->out_msg + 6 + offset,
28282828
out_buf_len - 6 - offset,
28292829
&n,
2830-
ssl->conf->f_rng, ssl->conf->p_rng, rs_ctx)) != 0) {
2830+
rs_ctx)) != 0) {
28312831
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_pk_sign", ret);
28322832
#if defined(MBEDTLS_SSL_ECP_RESTARTABLE_ENABLED)
28332833
if (ret == MBEDTLS_ERR_ECP_IN_PROGRESS) {

library/ssl_tls12_server.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,9 +3035,7 @@ static int ssl_prepare_server_key_exchange(mbedtls_ssl_context *ssl,
30353035
md_alg, hash, hashlen,
30363036
ssl->out_msg + ssl->out_msglen + 2,
30373037
out_buf_len - ssl->out_msglen - 2,
3038-
signature_len,
3039-
ssl->conf->f_rng,
3040-
ssl->conf->p_rng)) != 0) {
3038+
signature_len)) != 0) {
30413039
MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_pk_sign", ret);
30423040
return ret;
30433041
}

library/ssl_tls13_generic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,7 @@ static int ssl_tls13_write_certificate_verify_body(mbedtls_ssl_context *ssl,
978978

979979
if ((ret = mbedtls_pk_sign_ext(pk_type, own_key,
980980
md_alg, verify_hash, verify_hash_len,
981-
p + 4, (size_t) (end - (p + 4)), &signature_len,
982-
ssl->conf->f_rng, ssl->conf->p_rng)) != 0) {
981+
p + 4, (size_t) (end - (p + 4)), &signature_len)) != 0) {
983982
MBEDTLS_SSL_DEBUG_MSG(2, ("CertificateVerify signature failed with %s",
984983
mbedtls_ssl_sig_alg_to_str(*sig_alg)));
985984
MBEDTLS_SSL_DEBUG_RET(2, "mbedtls_pk_sign_ext", ret);

library/x509write_crt.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@ static int x509_write_time(unsigned char **p, unsigned char *start,
379379
}
380380

381381
int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx,
382-
unsigned char *buf, size_t size,
383-
int (*f_rng)(void *, unsigned char *, size_t),
384-
void *p_rng)
382+
unsigned char *buf, size_t size)
385383
{
386384
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
387385
const char *sig_oid;
@@ -571,8 +569,7 @@ int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx,
571569

572570

573571
if ((ret = mbedtls_pk_sign(ctx->issuer_key, ctx->md_alg,
574-
hash, hash_length, sig, sizeof(sig), &sig_len,
575-
f_rng, p_rng)) != 0) {
572+
hash, hash_length, sig, sizeof(sig), &sig_len)) != 0) {
576573
return ret;
577574
}
578575

@@ -614,15 +611,12 @@ int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx,
614611

615612
#if defined(MBEDTLS_PEM_WRITE_C)
616613
int mbedtls_x509write_crt_pem(mbedtls_x509write_cert *crt,
617-
unsigned char *buf, size_t size,
618-
int (*f_rng)(void *, unsigned char *, size_t),
619-
void *p_rng)
614+
unsigned char *buf, size_t size)
620615
{
621616
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
622617
size_t olen;
623618

624-
if ((ret = mbedtls_x509write_crt_der(crt, buf, size,
625-
f_rng, p_rng)) < 0) {
619+
if ((ret = mbedtls_x509write_crt_der(crt, buf, size)) < 0) {
626620
return ret;
627621
}
628622

library/x509write_csr.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ int mbedtls_x509write_csr_set_ns_cert_type(mbedtls_x509write_csr *ctx,
131131
static int x509write_csr_der_internal(mbedtls_x509write_csr *ctx,
132132
unsigned char *buf,
133133
size_t size,
134-
unsigned char *sig, size_t sig_size,
135-
int (*f_rng)(void *, unsigned char *, size_t),
136-
void *p_rng)
134+
unsigned char *sig, size_t sig_size)
137135
{
138136
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
139137
const char *sig_oid;
@@ -218,8 +216,7 @@ static int x509write_csr_der_internal(mbedtls_x509write_csr *ctx,
218216
return MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED;
219217
}
220218
if ((ret = mbedtls_pk_sign(ctx->key, ctx->md_alg, hash, 0,
221-
sig, sig_size, &sig_len,
222-
f_rng, p_rng)) != 0) {
219+
sig, sig_size, &sig_len)) != 0) {
223220
return ret;
224221
}
225222

@@ -274,9 +271,7 @@ static int x509write_csr_der_internal(mbedtls_x509write_csr *ctx,
274271
}
275272

276273
int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf,
277-
size_t size,
278-
int (*f_rng)(void *, unsigned char *, size_t),
279-
void *p_rng)
274+
size_t size)
280275
{
281276
int ret;
282277
unsigned char *sig;
@@ -286,8 +281,7 @@ int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf,
286281
}
287282

288283
ret = x509write_csr_der_internal(ctx, buf, size,
289-
sig, MBEDTLS_PK_SIGNATURE_MAX_SIZE,
290-
f_rng, p_rng);
284+
sig, MBEDTLS_PK_SIGNATURE_MAX_SIZE);
291285

292286
mbedtls_free(sig);
293287

@@ -298,15 +292,12 @@ int mbedtls_x509write_csr_der(mbedtls_x509write_csr *ctx, unsigned char *buf,
298292
#define PEM_END_CSR "-----END CERTIFICATE REQUEST-----\n"
299293

300294
#if defined(MBEDTLS_PEM_WRITE_C)
301-
int mbedtls_x509write_csr_pem(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size,
302-
int (*f_rng)(void *, unsigned char *, size_t),
303-
void *p_rng)
295+
int mbedtls_x509write_csr_pem(mbedtls_x509write_csr *ctx, unsigned char *buf, size_t size)
304296
{
305297
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
306298
size_t olen = 0;
307299

308-
if ((ret = mbedtls_x509write_csr_der(ctx, buf, size,
309-
f_rng, p_rng)) < 0) {
300+
if ((ret = mbedtls_x509write_csr_der(ctx, buf, size)) < 0) {
310301
return ret;
311302
}
312303

programs/fuzz/fuzz_dtlsserver.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
8282
return 1;
8383
}
8484
if (mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key,
85-
mbedtls_test_srv_key_len, NULL, 0,
86-
dummy_random, &ctr_drbg) != 0) {
85+
mbedtls_test_srv_key_len, NULL, 0) != 0) {
8786
return 1;
8887
}
8988
#endif

programs/fuzz/fuzz_privkey.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
4444
goto exit;
4545
}
4646

47-
ret = mbedtls_pk_parse_key(&pk, Data, Size, NULL, 0,
48-
dummy_random, &ctr_drbg);
47+
ret = mbedtls_pk_parse_key(&pk, Data, Size, NULL, 0);
4948
if (ret == 0) {
5049
#if defined(MBEDTLS_RSA_C)
5150
if (mbedtls_pk_get_type(&pk) == MBEDTLS_PK_RSA) {

programs/fuzz/fuzz_server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
9191
return 1;
9292
}
9393
if (mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key,
94-
mbedtls_test_srv_key_len, NULL, 0,
95-
dummy_random, &ctr_drbg) != 0) {
94+
mbedtls_test_srv_key_len, NULL, 0) != 0) {
9695
return 1;
9796
}
9897
#endif

programs/pkey/key_app.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ int main(int argc, char *argv[])
248248
goto cleanup;
249249
}
250250

251-
ret = mbedtls_pk_parse_keyfile(&pk, opt.filename, opt.password,
252-
mbedtls_ctr_drbg_random, &ctr_drbg);
251+
ret = mbedtls_pk_parse_keyfile(&pk, opt.filename, opt.password);
253252

254253
if (ret != 0) {
255254
mbedtls_printf(" failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x\n",

programs/pkey/key_app_writer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,7 @@ int main(int argc, char *argv[])
363363
goto exit;
364364
}
365365

366-
ret = mbedtls_pk_parse_keyfile(&key, opt.filename, NULL,
367-
mbedtls_ctr_drbg_random, &ctr_drbg);
366+
ret = mbedtls_pk_parse_keyfile(&key, opt.filename, NULL);
368367
if (ret != 0) {
369368
mbedtls_printf(" failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x",
370369
(unsigned int) -ret);

programs/pkey/pk_decrypt.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ int main(int argc, char *argv[])
8989
mbedtls_printf("\n . Reading private key from '%s'", argv[1]);
9090
fflush(stdout);
9191

92-
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "",
93-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
92+
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "")) != 0) {
9493
mbedtls_printf(" failed\n ! mbedtls_pk_parse_keyfile returned -0x%04x\n",
9594
(unsigned int) -ret);
9695
goto exit;
@@ -119,8 +118,7 @@ int main(int argc, char *argv[])
119118
mbedtls_printf("\n . Decrypting the encrypted data");
120119
fflush(stdout);
121120

122-
if ((ret = mbedtls_pk_decrypt(&pk, buf, i, result, &olen, sizeof(result),
123-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
121+
if ((ret = mbedtls_pk_decrypt(&pk, buf, i, result, &olen, sizeof(result))) != 0) {
124122
mbedtls_printf(" failed\n ! mbedtls_pk_decrypt returned -0x%04x\n",
125123
(unsigned int) -ret);
126124
goto exit;

programs/pkey/pk_encrypt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ int main(int argc, char *argv[])
105105
fflush(stdout);
106106

107107
if ((ret = mbedtls_pk_encrypt(&pk, input, strlen(argv[2]),
108-
buf, &olen, sizeof(buf),
109-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
108+
buf, &olen, sizeof(buf))) != 0) {
110109
mbedtls_printf(" failed\n ! mbedtls_pk_encrypt returned -0x%04x\n",
111110
(unsigned int) -ret);
112111
goto exit;

programs/pkey/pk_sign.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ int main(int argc, char *argv[])
8585
mbedtls_printf("\n . Reading private key from '%s'", argv[1]);
8686
fflush(stdout);
8787

88-
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "",
89-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
88+
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "")) != 0) {
9089
mbedtls_printf(" failed\n ! Could not parse '%s'\n", argv[1]);
9190
goto exit;
9291
}
@@ -106,8 +105,7 @@ int main(int argc, char *argv[])
106105
}
107106

108107
if ((ret = mbedtls_pk_sign(&pk, MBEDTLS_MD_SHA256, hash, 0,
109-
buf, sizeof(buf), &olen,
110-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
108+
buf, sizeof(buf), &olen)) != 0) {
111109
mbedtls_printf(" failed\n ! mbedtls_pk_sign returned -0x%04x\n", (unsigned int) -ret);
112110
goto exit;
113111
}

programs/pkey/rsa_sign_pss.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ int main(int argc, char *argv[])
8686
mbedtls_printf("\n . Reading private key from '%s'", argv[1]);
8787
fflush(stdout);
8888

89-
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "",
90-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
89+
if ((ret = mbedtls_pk_parse_keyfile(&pk, argv[1], "")) != 0) {
9190
mbedtls_printf(" failed\n ! Could not read key from '%s'\n", argv[1]);
9291
mbedtls_printf(" ! mbedtls_pk_parse_public_keyfile returned %d\n\n", ret);
9392
goto exit;
@@ -120,8 +119,7 @@ int main(int argc, char *argv[])
120119
}
121120

122121
if ((ret = mbedtls_pk_sign(&pk, MBEDTLS_MD_SHA256, hash, 0,
123-
buf, sizeof(buf), &olen,
124-
mbedtls_ctr_drbg_random, &ctr_drbg)) != 0) {
122+
buf, sizeof(buf), &olen)) != 0) {
125123
mbedtls_printf(" failed\n ! mbedtls_pk_sign returned %d\n\n", ret);
126124
goto exit;
127125
}

programs/ssl/dtls_server.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,7 @@ int main(void)
165165
(const unsigned char *) mbedtls_test_srv_key,
166166
mbedtls_test_srv_key_len,
167167
NULL,
168-
0,
169-
mbedtls_ctr_drbg_random,
170-
&ctr_drbg);
168+
0);
171169
if (ret != 0) {
172170
printf(" failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret);
173171
goto exit;

programs/ssl/ssl_client2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,12 +1736,12 @@ int main(int argc, char *argv[])
17361736
} else
17371737
#if defined(MBEDTLS_FS_IO)
17381738
if (strlen(opt.key_file)) {
1739-
ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, opt.key_pwd, rng_get, &rng);
1739+
ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, opt.key_pwd);
17401740
} else
17411741
#endif
17421742
{ ret = mbedtls_pk_parse_key(&pkey,
17431743
(const unsigned char *) mbedtls_test_cli_key,
1744-
mbedtls_test_cli_key_len, NULL, 0, rng_get, &rng); }
1744+
mbedtls_test_cli_key_len, NULL, 0); }
17451745
if (ret != 0) {
17461746
mbedtls_printf(" failed\n ! mbedtls_pk_parse_key returned -0x%x\n\n",
17471747
(unsigned int) -ret);

programs/ssl/ssl_fork_server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ int main(void)
138138
}
139139

140140
ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key,
141-
mbedtls_test_srv_key_len, NULL, 0,
142-
mbedtls_ctr_drbg_random, &ctr_drbg);
141+
mbedtls_test_srv_key_len, NULL, 0);
143142
if (ret != 0) {
144143
mbedtls_printf(" failed! mbedtls_pk_parse_key returned %d\n\n", ret);
145144
goto exit;

programs/ssl/ssl_mail_client.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ int main(int argc, char *argv[])
514514

515515
#if defined(MBEDTLS_FS_IO)
516516
if (strlen(opt.key_file)) {
517-
ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, "",
518-
mbedtls_ctr_drbg_random, &ctr_drbg);
517+
ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, "");
519518
} else
520519
#endif
521520
#if defined(MBEDTLS_PEM_PARSE_C)
@@ -524,9 +523,7 @@ int main(int argc, char *argv[])
524523
(const unsigned char *) mbedtls_test_cli_key,
525524
mbedtls_test_cli_key_len,
526525
NULL,
527-
0,
528-
mbedtls_ctr_drbg_random,
529-
&ctr_drbg);
526+
0);
530527
}
531528
#else
532529
{

programs/ssl/ssl_pthread_server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ int main(void)
379379

380380
mbedtls_pk_init(&pkey);
381381
ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key,
382-
mbedtls_test_srv_key_len, NULL, 0,
383-
mbedtls_ctr_drbg_random, &ctr_drbg);
382+
mbedtls_test_srv_key_len, NULL, 0);
384383
if (ret != 0) {
385384
mbedtls_printf(" failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret);
386385
goto exit;

programs/ssl/ssl_server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ int main(void)
144144
}
145145

146146
ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key,
147-
mbedtls_test_srv_key_len, NULL, 0,
148-
mbedtls_ctr_drbg_random, &ctr_drbg);
147+
mbedtls_test_srv_key_len, NULL, 0);
149148
if (ret != 0) {
150149
mbedtls_printf(" failed\n ! mbedtls_pk_parse_key returned %d\n\n", ret);
151150
goto exit;

0 commit comments

Comments
 (0)