summaryrefslogtreecommitdiffstats
path: root/include/crypto/rsa.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-03-18 10:41:53 +0100
committerRichard Levitte <levitte@openssl.org>2021-03-19 16:46:39 +0100
commitcf333799979755dd46193b49c15db0afd262c6a0 (patch)
tree77e5ab82979b1b8a9a64fcb2e0500af5361a57d0 /include/crypto/rsa.h
parente0be34beee9ef8ebab49c51581f796e013600b77 (diff)
PROV: Add type specific PKCS#8 decoding to the DER->key decoders
This required refactoring a number of functions from the diverse EVP_PKEY_ASN1_METHOD implementations to become shared backend functions. It also meant modifying a few of them to return pointers to our internal RSA / DSA/ DH / EC_KEY, ... structures instead of manipulating an EVP_PKEY pointer directly, letting the caller do the latter. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14314)
Diffstat (limited to 'include/crypto/rsa.h')
-rw-r--r--include/crypto/rsa.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/crypto/rsa.h b/include/crypto/rsa.h
index 7fca88dfe4..69fa8a4d8a 100644
--- a/include/crypto/rsa.h
+++ b/include/crypto/rsa.h
@@ -13,6 +13,7 @@
# include <openssl/core.h>
# include <openssl/rsa.h>
+# include <openssl/x509.h>
# include "crypto/types.h"
typedef struct rsa_pss_params_30_st {
@@ -69,6 +70,14 @@ int ossl_rsa_pss_params_30_fromdata(RSA_PSS_PARAMS_30 *pss_params,
int *defaults_set,
const OSSL_PARAM params[],
OSSL_LIB_CTX *libctx);
+int ossl_rsa_set0_pss_params(RSA *r, RSA_PSS_PARAMS *pss);
+int ossl_rsa_pss_get_param_unverified(const RSA_PSS_PARAMS *pss,
+ const EVP_MD **pmd, const EVP_MD **pmgf1md,
+ int *psaltlen, int *ptrailerField);
+RSA_PSS_PARAMS *ossl_rsa_pss_decode(const X509_ALGOR *alg);
+int ossl_rsa_param_decode(RSA *rsa, const X509_ALGOR *alg);
+RSA *ossl_rsa_key_from_pkcs8(const PKCS8_PRIV_KEY_INFO *p8inf,
+ OSSL_LIB_CTX *libctx, const char *propq);
int ossl_rsa_padding_check_PKCS1_type_2_TLS(OSSL_LIB_CTX *ctx, unsigned char *to,
size_t tlen,
@@ -113,4 +122,5 @@ void ossl_rsa_acvp_test_free(RSA_ACVP_TEST *t);
# define RSA_ACVP_TEST void
# endif
+RSA *evp_pkey_get1_RSA_PSS(EVP_PKEY *pkey);
#endif