summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-12-04 10:21:06 +0000
committerMatt Caswell <matt@openssl.org>2019-12-16 14:50:07 +0000
commitc1ebe0509a1b4af4cc1f3a7a14ca463d32af918c (patch)
tree4660de1a093de8daf56ee48f6e608931afd06e92 /include
parent517f24130e83b9b3c2262758f34a7c09a7f63089 (diff)
Backport the RSA_get0_pss_params() function from master
This is a missing accessor in order to obtain PSS parameters from an RSA key, which should also be available in 1.1.1. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10568)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ossl_typ.h1
-rw-r--r--include/openssl/rsa.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h
index 7993ca28f3..e0edfaaf47 100644
--- a/include/openssl/ossl_typ.h
+++ b/include/openssl/ossl_typ.h
@@ -109,6 +109,7 @@ typedef struct dsa_method DSA_METHOD;
typedef struct rsa_st RSA;
typedef struct rsa_meth_st RSA_METHOD;
+typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
typedef struct ec_key_st EC_KEY;
typedef struct ec_key_method_st EC_KEY_METHOD;
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
index cdce1264eb..5e76365c0d 100644
--- a/include/openssl/rsa.h
+++ b/include/openssl/rsa.h
@@ -224,6 +224,7 @@ const BIGNUM *RSA_get0_q(const RSA *d);
const BIGNUM *RSA_get0_dmp1(const RSA *r);
const BIGNUM *RSA_get0_dmq1(const RSA *r);
const BIGNUM *RSA_get0_iqmp(const RSA *r);
+const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r);
void RSA_clear_flags(RSA *r, int flags);
int RSA_test_flags(const RSA *r, int flags);
void RSA_set_flags(RSA *r, int flags);
@@ -279,14 +280,14 @@ int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey)
-typedef struct rsa_pss_params_st {
+struct rsa_pss_params_st {
X509_ALGOR *hashAlgorithm;
X509_ALGOR *maskGenAlgorithm;
ASN1_INTEGER *saltLength;
ASN1_INTEGER *trailerField;
/* Decoded hash algorithm from maskGenAlgorithm */
X509_ALGOR *maskHash;
-} RSA_PSS_PARAMS;
+};
DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS)