[openssl] OpenSSL_1_1_1-stable update
Matt Caswell
matt at openssl.org
Mon Dec 16 14:55:12 UTC 2019
The branch OpenSSL_1_1_1-stable has been updated
via e2af84bd45c017c0c6a0fa06ee5d7fcf11d7366d (commit)
via c1ebe0509a1b4af4cc1f3a7a14ca463d32af918c (commit)
from 517f24130e83b9b3c2262758f34a7c09a7f63089 (commit)
- Log -----------------------------------------------------------------
commit e2af84bd45c017c0c6a0fa06ee5d7fcf11d7366d
Author: Matt Caswell <matt at openssl.org>
Date: Wed Dec 4 10:21:52 2019 +0000
Update the HISTORY entry for RSA_get0_pss_params()
Make a note of when this function was first introduced
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10568)
commit c1ebe0509a1b4af4cc1f3a7a14ca463d32af918c
Author: Matt Caswell <matt at openssl.org>
Date: Wed Dec 4 10:21:06 2019 +0000
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 at openssl.org>
Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10568)
-----------------------------------------------------------------------
Summary of changes:
crypto/rsa/rsa_lib.c | 5 +++++
doc/man3/RSA_get0_key.pod | 7 ++++++-
include/openssl/ossl_typ.h | 1 +
include/openssl/rsa.h | 5 +++--
util/libcrypto.num | 1 +
5 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index cfee919352..63fd1a6db4 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -451,6 +451,11 @@ const BIGNUM *RSA_get0_iqmp(const RSA *r)
return r->iqmp;
}
+const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r)
+{
+ return r->pss;
+}
+
void RSA_clear_flags(RSA *r, int flags)
{
r->flags &= ~flags;
diff --git a/doc/man3/RSA_get0_key.pod b/doc/man3/RSA_get0_key.pod
index 358c2de256..adcd57c490 100644
--- a/doc/man3/RSA_get0_key.pod
+++ b/doc/man3/RSA_get0_key.pod
@@ -5,7 +5,7 @@
RSA_set0_key, RSA_set0_factors, RSA_set0_crt_params, RSA_get0_key,
RSA_get0_factors, RSA_get0_crt_params,
RSA_get0_n, RSA_get0_e, RSA_get0_d, RSA_get0_p, RSA_get0_q,
-RSA_get0_dmp1, RSA_get0_dmq1, RSA_get0_iqmp,
+RSA_get0_dmp1, RSA_get0_dmq1, RSA_get0_iqmp, RSA_get0_pss_params,
RSA_clear_flags,
RSA_test_flags, RSA_set_flags, RSA_get0_engine, RSA_get_multi_prime_extra_count,
RSA_get0_multi_prime_factors, RSA_get0_multi_prime_crt_params,
@@ -33,6 +33,7 @@ RSA_set0_multi_prime_params, RSA_get_version
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);
@@ -98,6 +99,8 @@ retrieved separately by the corresponding function
RSA_get0_n(), RSA_get0_e(), RSA_get0_d(), RSA_get0_p(), RSA_get0_q(),
RSA_get0_dmp1(), RSA_get0_dmq1(), and RSA_get0_iqmp(), respectively.
+RSA_get0_pss_params() is used to retrieve the RSA-PSS parameters.
+
RSA_set_flags() sets the flags in the B<flags> parameter on the RSA
object. Multiple flags can be passed in one go (bitwise ORed together).
Any flags that are already set are left set. RSA_test_flags() tests to
@@ -157,6 +160,8 @@ L<RSA_new(3)>, L<RSA_size(3)>
=head1 HISTORY
+The RSA_get0_pss_params() function was added in OpenSSL 1.1.1e.
+
The
RSA_get_multi_prime_extra_count(), RSA_get0_multi_prime_factors(),
RSA_get0_multi_prime_crt_params(), RSA_set0_multi_prime_params(),
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)
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 1dde397bed..876b7ca710 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -4586,3 +4586,4 @@ EVP_PKEY_meth_set_digestsign 4539 1_1_1e EXIST::FUNCTION:
EVP_PKEY_meth_set_digestverify 4540 1_1_1e EXIST::FUNCTION:
EVP_PKEY_meth_get_digestverify 4541 1_1_1e EXIST::FUNCTION:
EVP_PKEY_meth_get_digestsign 4542 1_1_1e EXIST::FUNCTION:
+RSA_get0_pss_params 4543 1_1_1e EXIST::FUNCTION:RSA
More information about the openssl-commits
mailing list