mirror of
https://github.com/openssl/openssl.git
synced 2024-12-09 05:51:54 +08:00
8c7c1c84cb
Previously all the SubjectPublicKeyInfo decoders were specific to a key type. We would iterate over all them until a match was found for the correct key type. Each one would fully decode the key before then testing whether it was a match or not - throwing it away if not. This was very inefficient. Instead we introduce a generic SubjectPublicKeyInfo decoder which figures out what type of key is contained within it, before subsequently passing on the data to a key type specific SubjectPublicKeyInfo decoder. Fixes #15646 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15662)
21 lines
796 B
Plaintext
21 lines
796 B
Plaintext
# We make separate GOAL variables for each algorithm, to make it easy to
|
|
# switch each to the Legacy provider when needed.
|
|
|
|
$ENCODER_GOAL=../../libdefault.a
|
|
$DECODER_GOAL=../../libdefault.a
|
|
|
|
SOURCE[$ENCODER_GOAL]=endecoder_common.c
|
|
|
|
SOURCE[$DECODER_GOAL]=decode_der2key.c decode_epki2pki.c decode_pem2der.c \
|
|
decode_msblob2key.c decode_pvk2key.c \
|
|
decode_spki2typespki.c
|
|
|
|
SOURCE[$ENCODER_GOAL]=encode_key2any.c encode_key2text.c encode_key2ms.c
|
|
# encode_key2blob.c is only being included when EC is enabled, because we
|
|
# currently only define a "blob" output type for EC public keys. This may
|
|
# change in the future.
|
|
IF[{- !$disabled{ec} -}]
|
|
SOURCE[$ENCODER_GOAL]=encode_key2blob.c
|
|
ENDIF
|
|
DEPEND[encode_key2any.o]=../../common/include/prov/der_rsa.h
|