summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/rsa/rsa.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index 9859c5f420..78ac04cf96 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.50 2019/11/02 13:52:31 jsing Exp $ */ 1/* $OpenBSD: rsa.h,v 1.51 2019/11/04 12:30:56 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -84,7 +84,24 @@ extern "C" {
84/* typedef struct rsa_st RSA; */ 84/* typedef struct rsa_st RSA; */
85/* typedef struct rsa_meth_st RSA_METHOD; */ 85/* typedef struct rsa_meth_st RSA_METHOD; */
86 86
87typedef struct rsa_pss_params_st RSA_PSS_PARAMS; 87typedef struct rsa_pss_params_st {
88 X509_ALGOR *hashAlgorithm;
89 X509_ALGOR *maskGenAlgorithm;
90 ASN1_INTEGER *saltLength;
91 ASN1_INTEGER *trailerField;
92
93 /* Hash algorithm decoded from maskGenAlgorithm. */
94 X509_ALGOR *maskHash;
95} RSA_PSS_PARAMS;
96
97typedef struct rsa_oaep_params_st {
98 X509_ALGOR *hashFunc;
99 X509_ALGOR *maskGenFunc;
100 X509_ALGOR *pSourceFunc;
101
102 /* Hash algorithm decoded from maskGenFunc. */
103 X509_ALGOR *maskHash;
104} RSA_OAEP_PARAMS;
88 105
89struct rsa_meth_st { 106struct rsa_meth_st {
90 const char *name; 107 const char *name;
@@ -345,31 +362,12 @@ RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len);
345int i2d_RSAPrivateKey(const RSA *a, unsigned char **out); 362int i2d_RSAPrivateKey(const RSA *a, unsigned char **out);
346extern const ASN1_ITEM RSAPrivateKey_it; 363extern const ASN1_ITEM RSAPrivateKey_it;
347 364
348typedef struct rsa_pss_params_st {
349 X509_ALGOR *hashAlgorithm;
350 X509_ALGOR *maskGenAlgorithm;
351 ASN1_INTEGER *saltLength;
352 ASN1_INTEGER *trailerField;
353
354 /* Hash algorithm decoded from maskGenAlgorithm. */
355 X509_ALGOR *maskHash;
356} RSA_PSS_PARAMS;
357
358RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void); 365RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void);
359void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a); 366void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a);
360RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len); 367RSA_PSS_PARAMS *d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len);
361int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out); 368int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out);
362extern const ASN1_ITEM RSA_PSS_PARAMS_it; 369extern const ASN1_ITEM RSA_PSS_PARAMS_it;
363 370
364typedef struct rsa_oaep_params_st {
365 X509_ALGOR *hashFunc;
366 X509_ALGOR *maskGenFunc;
367 X509_ALGOR *pSourceFunc;
368
369 /* Hash algorithm decoded from maskGenFunc. */
370 X509_ALGOR *maskHash;
371} RSA_OAEP_PARAMS;
372
373RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void); 371RSA_OAEP_PARAMS *RSA_OAEP_PARAMS_new(void);
374void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a); 372void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a);
375RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len); 373RSA_OAEP_PARAMS *d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len);