Skip to content

Commit 71ebad1

Browse files
committed
Add test
1 parent 2f01c9d commit 71ebad1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,10 @@ static int test_wolfSSL_CTX_use_PrivateKey_file(void)
23122312
/* invalid key type */
23132313
ExpectFalse(wolfSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, 9999));
23142314

2315+
/* invalid key format */
2316+
ExpectFalse(wolfSSL_CTX_use_PrivateKey_file(ctx, "./certs/dh-priv-2048.pem",
2317+
WOLFSSL_FILETYPE_PEM));
2318+
23152319
/* success */
23162320
#ifdef NO_RSA
23172321
/* rsa needed */

0 commit comments

Comments
 (0)