It currently returns NULL. This is OpenSSL
4088b926 + De Morgan.
ok jsing
-/* $OpenBSD: p_lib.c,v 1.34 2023/07/07 19:37:54 beck Exp $ */
+/* $OpenBSD: p_lib.c,v 1.35 2023/09/01 17:12:19 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
RSA *
EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
{
- if (pkey->type != EVP_PKEY_RSA) {
- EVPerror(EVP_R_EXPECTING_AN_RSA_KEY);
- return NULL;
- }
- return pkey->pkey.rsa;
+ if (pkey->type == EVP_PKEY_RSA || pkey->type == EVP_PKEY_RSA_PSS)
+ return pkey->pkey.rsa;
+
+ EVPerror(EVP_R_EXPECTING_AN_RSA_KEY);
+ return NULL;
}
RSA *