diff options
author | Matt Caswell <matt@openssl.org> | 2021-03-02 16:52:00 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-03-08 16:13:09 +0100 |
commit | 7bc0fdd3fd4535e06c35b92d71afab9a6de94cc5 (patch) | |
tree | 2e57cd75e2b81a4ae2bc8d375096e094f8b5b0e5 /crypto/pem | |
parent | Document the change in behaviour of the the low level key getters/setters (diff) | |
download | openssl-7bc0fdd3fd4535e06c35b92d71afab9a6de94cc5.tar.xz openssl-7bc0fdd3fd4535e06c35b92d71afab9a6de94cc5.zip |
Make the EVP_PKEY_get0* functions have a const return type
OTC have decided that the EVP_PKEY_get0* functions should have a const
return type. This is a breaking change to emphasise that these values
should be considered as immutable.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14319)
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pvkfmt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c index de673be005..8006c64b3a 100644 --- a/crypto/pem/pvkfmt.c +++ b/crypto/pem/pvkfmt.c @@ -450,12 +450,12 @@ static void write_lebn(unsigned char **out, const BIGNUM *bn, int len) *out += len; } -static int check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *magic); -static void write_rsa(unsigned char **out, RSA *rsa, int ispub); +static int check_bitlen_rsa(const RSA *rsa, int ispub, unsigned int *magic); +static void write_rsa(unsigned char **out, const RSA *rsa, int ispub); #ifndef OPENSSL_NO_DSA -static int check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *magic); -static void write_dsa(unsigned char **out, DSA *dsa, int ispub); +static int check_bitlen_dsa(const DSA *dsa, int ispub, unsigned int *magic); +static void write_dsa(unsigned char **out, const DSA *dsa, int ispub); #endif static int do_i2b(unsigned char **out, const EVP_PKEY *pk, int ispub) @@ -542,7 +542,7 @@ static int do_i2b_bio(BIO *out, const EVP_PKEY *pk, int ispub) return -1; } -static int check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *pmagic) +static int check_bitlen_rsa(const RSA *rsa, int ispub, unsigned int *pmagic) { int nbyte, hnbyte, bitlen; const BIGNUM *e; @@ -582,7 +582,7 @@ static int check_bitlen_rsa(RSA *rsa, int ispub, unsigned int *pmagic) return 0; } -static void write_rsa(unsigned char **out, RSA *rsa, int ispub) +static void write_rsa(unsigned char **out, const RSA *rsa, int ispub) { int nbyte, hnbyte; const BIGNUM *n, *d, *e, *p, *q, *iqmp, *dmp1, *dmq1; @@ -605,7 +605,7 @@ static void write_rsa(unsigned char **out, RSA *rsa, int ispub) } #ifndef OPENSSL_NO_DSA -static int check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *pmagic) +static int check_bitlen_dsa(const DSA *dsa, int ispub, unsigned int *pmagic) { int bitlen; const BIGNUM *p = NULL, *q = NULL, *g = NULL; @@ -633,7 +633,7 @@ static int check_bitlen_dsa(DSA *dsa, int ispub, unsigned int *pmagic) return 0; } -static void write_dsa(unsigned char **out, DSA *dsa, int ispub) +static void write_dsa(unsigned char **out, const DSA *dsa, int ispub) { int nbyte; const BIGNUM *p = NULL, *q = NULL, *g = NULL; |