Clear OpenSSL errors on EC_KEY_get0_private_key failures

This commit is contained in:
Mark Andrews
2023-08-31 10:57:43 +10:00
parent abd8c03592
commit 86b04368b0

View File

@@ -563,6 +563,7 @@ opensslecdsa_extract_private_key(const dst_key_t *key, unsigned char *buf,
privkey = EC_KEY_get0_private_key(eckey);
if (privkey == NULL) {
ERR_clear_error();
return (false);
}