Skip to content

Commit

Permalink
Support comparsing sm2 key witch is encryped in legacy or 1.1.1
Browse files Browse the repository at this point in the history
Signed-off-by: lan1120 <lanming@huawei.com>
  • Loading branch information
lan1120 committed May 22, 2023
1 parent 4093382 commit 038375a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/openssl/pem.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ extern "C" {
# define PEM_STRING_PARAMETERS "PARAMETERS"
# define PEM_STRING_CMS "CMS"
# define PEM_STRING_SM2PARAMETERS "SM2 PARAMETERS"
# define PEM_STRING_SM2 "SM2 PRIVATE KEY"

# define PEM_TYPE_ENCRYPTED 10
# define PEM_TYPE_MIC_ONLY 20
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/encode_decode/decode_pem2der.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ static int pem2der_decode(void *vctx, OSSL_CORE_BIO *cin, int selection,
{ PEM_STRING_DSAPARAMS, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
{ PEM_STRING_ECPRIVATEKEY, OSSL_OBJECT_PKEY, "EC", "type-specific" },
{ PEM_STRING_ECPARAMETERS, OSSL_OBJECT_PKEY, "EC", "type-specific" },
{ PEM_STRING_SM2, OSSL_OBJECT_PKEY, "SM2", "type-specific"},
{ PEM_STRING_SM2PARAMETERS, OSSL_OBJECT_PKEY, "SM2", "type-specific" },
{ PEM_STRING_RSA, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
{ PEM_STRING_RSA_PUBLIC, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
Expand Down

0 comments on commit 038375a

Please sign in to comment.