diff options
-rw-r--r-- | crypto/evp/evp_lib.c | 3 | ||||
-rw-r--r-- | doc/man3/EVP_PKEY_keygen.pod | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 98bb25655d..a8dbfbfada 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -1215,7 +1215,8 @@ EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq, } else if (OPENSSL_strcasecmp(type, "ED25519") != 0 && OPENSSL_strcasecmp(type, "X25519") != 0 && OPENSSL_strcasecmp(type, "ED448") != 0 - && OPENSSL_strcasecmp(type, "X448") != 0) { + && OPENSSL_strcasecmp(type, "X448") != 0 + && OPENSSL_strcasecmp(type, "SM2") != 0) { ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT); goto end; } diff --git a/doc/man3/EVP_PKEY_keygen.pod b/doc/man3/EVP_PKEY_keygen.pod index 87644cc5c3..4331236186 100644 --- a/doc/man3/EVP_PKEY_keygen.pod +++ b/doc/man3/EVP_PKEY_keygen.pod @@ -100,7 +100,7 @@ If I<type> is C<RSA>, a B<size_t> parameter must be given to specify the size of the RSA key. If I<type> is C<EC>, a string parameter must be given to specify the name of the EC curve. -If I<type> is C<X25519>, C<X448>, C<ED25519>, or C<ED448> +If I<type> is C<X25519>, C<X448>, C<ED25519>, C<ED448>, or C<SM2> no further parameter is needed. =head1 RETURN VALUES |