diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-14 21:09:49 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-21 09:04:10 +0200 |
commit | ded346fad2f2c86bc13ac3beaf5e00e969f04442 (patch) | |
tree | 6422944936a63fef97081630a5f5ef6ff7017a3c /include/openssl | |
parent | 4cdf44c46b699934b86b9d842cfd4448b7dbe58e (diff) | |
download | openssl-new-ded346fad2f2c86bc13ac3beaf5e00e969f04442.tar.gz |
Add libctx and propq param to ASN.1 sign/verify/HMAC/decrypt
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/asn1.h | 10 | ||||
-rw-r--r-- | include/openssl/asn1err.h | 1 | ||||
-rw-r--r-- | include/openssl/evp.h | 8 | ||||
-rw-r--r-- | include/openssl/x509.h | 23 |
4 files changed, 24 insertions, 18 deletions
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index a62d4d7755..b47e8e823e 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -678,6 +678,16 @@ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x); CHECKED_PTR_OF(const type, x))) void *ASN1_item_dup(const ASN1_ITEM *it, const void *x); +int ASN1_item_sign_with_libctx(const ASN1_ITEM *it, X509_ALGOR *algor1, + X509_ALGOR *algor2, ASN1_BIT_STRING *signature, + const void *data, const ASN1_OCTET_STRING *id, + EVP_PKEY *pkey, const EVP_MD *md, + OPENSSL_CTX *libctx, const char *propq); +int ASN1_item_verify_with_libctx(const ASN1_ITEM *it, const X509_ALGOR *alg, + const ASN1_BIT_STRING *signature, + const void *data, + const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, + OPENSSL_CTX *libctx, const char *propq); /* ASN1 alloc/free macros for when a type is only used internally */ diff --git a/include/openssl/asn1err.h b/include/openssl/asn1err.h index 3247e0f445..f610d8816d 100644 --- a/include/openssl/asn1err.h +++ b/include/openssl/asn1err.h @@ -59,7 +59,6 @@ int ERR_load_ASN1_strings(void); # define ASN1_F_ASN1_ITEM_I2D_BIO 0 # define ASN1_F_ASN1_ITEM_I2D_FP 0 # define ASN1_F_ASN1_ITEM_PACK 0 -# define ASN1_F_ASN1_ITEM_SIGN 0 # define ASN1_F_ASN1_ITEM_SIGN_CTX 0 # define ASN1_F_ASN1_ITEM_UNPACK 0 # define ASN1_F_ASN1_ITEM_VERIFY 0 diff --git a/include/openssl/evp.h b/include/openssl/evp.h index f1dc6204bc..62015a7b1b 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1446,13 +1446,13 @@ void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth, int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, - void *asn, - X509_ALGOR *a, - ASN1_BIT_STRING *sig, + const void *data, + const X509_ALGOR *a, + const ASN1_BIT_STRING *sig, EVP_PKEY *pkey), int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, - void *asn, + const void *data, X509_ALGOR *alg1, X509_ALGOR *alg2, ASN1_BIT_STRING *sig)); diff --git a/include/openssl/x509.h b/include/openssl/x509.h index c373fc9845..9aef28c954 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -621,33 +621,30 @@ X509_INFO *X509_INFO_new(void); void X509_INFO_free(X509_INFO *a); char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size); +/* TODO move this block of decls to asn1.h when 'breaking change' is possible */ DEPRECATEDIN_3_0(int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey)) - DEPRECATEDIN_3_0(int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, unsigned char *md, unsigned int *len)) - DEPRECATEDIN_3_0(int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey, const EVP_MD *type)) - int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data, unsigned char *md, unsigned int *len); - -int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey); -int ASN1_item_verify_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, - ASN1_BIT_STRING *signature, void *data, +int ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg, + const ASN1_BIT_STRING *signature, const void *data, + EVP_PKEY *pkey); +int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg, + const ASN1_BIT_STRING *signature, const void *data, EVP_MD_CTX *ctx); - -int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, - X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data, - EVP_PKEY *pkey, const EVP_MD *type); +int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, + ASN1_BIT_STRING *signature, const void *data, + EVP_PKEY *pkey, const EVP_MD *md); int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, - void *asn, EVP_MD_CTX *ctx); + const void *data, EVP_MD_CTX *ctx); long X509_get_version(const X509 *x); int X509_set_version(X509 *x, long version); |