diff options
author | Hubert Kario <hkario@redhat.com> | 2017-07-26 15:05:59 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-07-26 15:04:54 -0400 |
commit | e15c95ce8596bcc2a5f5e163ff78ccf469dbf994 (patch) | |
tree | e9c06483bc18465e6a08845a0080d5d73553e9b6 /include | |
parent | 11a25d34549461ad6ddd61322ed3b54dd4c69686 (diff) |
make scrypt ASN.1 parameter functions public
Since scrypt PBKDF can be used both in PKCS#5 and PKCS#12 files,
do share the code between them.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1334)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/x509.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 286c399aa2..e4e46397b3 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -305,6 +305,16 @@ typedef struct PBKDF2PARAM_st { X509_ALGOR *prf; } PBKDF2PARAM; +#ifndef OPENSSL_NO_SCRYPT +typedef struct SCRYPT_PARAMS_st { + ASN1_OCTET_STRING *salt; + ASN1_INTEGER *costParameter; + ASN1_INTEGER *blockSize; + ASN1_INTEGER *parallelizationParameter; + ASN1_INTEGER *keyLength; +} SCRYPT_PARAMS; +#endif + #ifdef __cplusplus } #endif @@ -971,6 +981,9 @@ X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name); DECLARE_ASN1_FUNCTIONS(PBEPARAM) DECLARE_ASN1_FUNCTIONS(PBE2PARAM) DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) +#ifndef OPENSSL_NO_SCRYPT +DECLARE_ASN1_FUNCTIONS(SCRYPT_PARAMS) +#endif int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, const unsigned char *salt, int saltlen); |