summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2019-11-04 12:30:57 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2019-11-04 12:30:57 +0000
commit297a1de3617dcbf555a91a6ef4006092244e621c (patch)
treeb80346416c0bfea1fcfba2f920bcb3c71a8c38b7 /lib/libcrypto
parent98f28102f38c427ad8bb32cf3d2bf1cd04d32f05 (diff)
Reshuffle RSA_PSS_PARAMS and RSA_OAEP_PARAMS to avoid duplicate typedef.
Issue spotted by bcook@ ok bcook@ inoguchi@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/rsa/rsa.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/lib/libcrypto/rsa/rsa.h b/lib/libcrypto/rsa/rsa.h
index 9859c5f4203..78ac04cf96e 100644
--- a/lib/libcrypto/rsa/rsa.h
+++ b/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa.h,v 1.50 2019/11/02 13:52:31 jsing Exp $ */
+/* $OpenBSD: rsa.h,v 1.51 2019/11/04 12:30:56 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -84,7 +84,24 @@ extern "C" {
/* typedef struct rsa_st RSA; */
/* typedef struct rsa_meth_st RSA_METHOD; */
-typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
+typedef struct rsa_pss_params_st {
+ X509_ALGOR *hashAlgorithm;
+ X509_ALGOR *maskGenAlgorithm;
+ ASN1_INTEGER *saltLength;
+ ASN1_INTEGER *trailerField;
+
+ /* Hash algorithm decoded from maskGenAlgorithm. */
+ X509_ALGOR *maskHash;
+} RSA_PSS_PARAMS;
+
+typedef struct rsa_oaep_params_st {
+ X509_ALGOR *hashFunc;
+ X509_ALGOR *maskGenFunc;
+ X509_ALGOR *pSourceFunc;
+
+ /* Hash algorithm decoded from maskGenFunc. */
+ X509_ALGOR *maskHash;
+} RSA_OAEP_PARAMS;
struct rsa_meth_st {
const char *name;
@@ -345,31 +362,12 @@ RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len);
int i2d_RSAPrivateKey(const RSA *a, unsigned char **out);
extern const ASN1_ITEM RSAPrivateKey_it;
-typedef struct rsa_pss_params_st {
- X509_ALGOR *hashAlgorithm;
- X509_ALGOR *maskGenAlgorithm;
- ASN1_INTEGER *saltLength;
- ASN1_INTEGER *trailerField;
-
- /* Hash algorithm decoded from maskGenAlgorithm. */
- X509_ALGOR *maskHash;
-} RSA_PSS_PARAMS;
-
RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void);
void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a);
RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len);
int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out);
extern const ASN1_ITEM RSA_PSS_PARAMS_it;
-typedef struct rsa_oaep_params_st {
- X509_ALGOR *hashFunc;
- X509_ALGOR *maskGenFunc;
- X509_ALGOR *pSourceFunc;
-
- /* Hash algorithm decoded from maskGenFunc. */
- X509_ALGOR *maskHash;
-} RSA_OAEP_PARAMS;
-
RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void);
void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a);
RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len);