openssl/crypto/asn1
Richard Levitte bbaddbc068 X509: Refactor X509_verify() and X509_REQ_verify() for better streamlining
The solution to incorporate the SM2 identity processing was an off
the side hack that more or less duplicated the ASN1_item_verify()
code with just a few lines being different.  We replace this with
a new function ASN1_item_verify_ctx(), which takes an EVP_MD_CTX
pointer instead of an EVP_PKEY pointer, just like its sibling
ASN1_item_sign_ctx().

This allows us to refactor X509_verify() and X509_REQ_verify() to
simply create a local EVP_MD_CTX and an attached EVP_PKEY_CTX,
which gets to hold the SM2 identity, if there is one, and then let
ASN1_item_verify_ctx() to its job.

This will also make it easier to adapt ASN1_item_verify_ctx() for
provider based keys.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/10942)
2020-02-02 12:04:00 +01:00
..
a_bitstr.c Reorganize local header files 2019-09-28 20:26:35 +02:00
a_d2i_fp.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
a_digest.c
a_dup.c
a_gentm.c Add duplication APIs to ASN1_TIME and related types 2020-01-17 11:30:33 +08:00
a_i2d_fp.c
a_int.c Reorganize local header files 2019-09-28 20:26:35 +02:00
a_mbstr.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
a_object.c Reorganize local header files 2019-09-28 20:26:35 +02:00
a_octet.c
a_print.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
a_sign.c Adapt ASN1_item_sign_ctx() for use with provided keypairs 2020-01-28 08:06:01 +01:00
a_strex.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
a_strnid.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
a_time.c Add duplication APIs to ASN1_TIME and related types 2020-01-17 11:30:33 +08:00
a_type.c Reorganize local header files 2019-09-28 20:26:35 +02:00
a_utctm.c Add duplication APIs to ASN1_TIME and related types 2020-01-17 11:30:33 +08:00
a_utf8.c
a_verify.c X509: Refactor X509_verify() and X509_REQ_verify() for better streamlining 2020-02-02 12:04:00 +01:00
ameth_lib.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
asn1_err.c util/mkerr.pl: make it not depend on the function code 2019-09-12 17:59:52 +02:00
asn1_gen.c
asn1_item_list.c
asn1_item_list.h Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
asn1_lib.c Update source files for pre-3.0 deprecation 2019-11-07 11:37:25 +01:00
asn1_local.h Reorganize local header files 2019-09-28 20:26:35 +02:00
asn1_par.c Avoid leak in error path of asn1_parse2 2020-01-14 18:34:03 +01:00
asn_mime.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
asn_moid.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
asn_mstbl.c
asn_pack.c
bio_asn1.c
bio_ndef.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
build.info
charmap.h Run make update 2020-01-02 14:39:34 +00:00
charmap.pl Make generated copyright year be "now" 2020-01-07 15:53:15 -05:00
d2i_param.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
d2i_pr.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
d2i_pu.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
evp_asn1.c
f_int.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
f_string.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
i2d_param.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
i2d_pr.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
i2d_pu.c
n_pkey.c
nsseq.c
p5_pbe.c
p5_pbev2.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
p5_scrypt.c
p8_pkey.c New functions for PKCS8 attributes management 2020-01-24 15:09:05 +03:00
standard_methods.h
t_bitst.c
t_pkey.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
t_spki.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
tasn_dec.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
tasn_enc.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
tasn_fre.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
tasn_new.c Reorganize local header files 2019-09-28 20:26:35 +02:00
tasn_prn.c Reorganize local header files 2019-09-28 20:26:35 +02:00
tasn_scn.c Reorganize local header files 2019-09-28 20:26:35 +02:00
tasn_typ.c
tasn_utl.c Reorganize local header files 2019-09-28 20:26:35 +02:00
tbl_standard.h
x_algor.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x_bignum.c Explicitly test against NULL; do not use !p or similar 2019-10-09 21:32:15 +02:00
x_info.c
x_int64.c Reorganize local header files 2019-09-28 20:26:35 +02:00
x_long.c Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
x_pkey.c
x_sig.c Reorganize private crypto header files 2019-09-28 20:26:34 +02:00
x_spki.c
x_val.c