From 8beb0e3cc976b42ae12284aa1fd3b3c8eeb2030c Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Tue, 19 Mar 2024 04:52:57 -0400 Subject: Add docs noting requirements for SM2 signing Reviewed-by: Paul Yang Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/24078) (cherry picked from commit 54673b93594a71c9f8052a1df1a7c6bf07c49f4d) --- doc/man7/EVP_PKEY-SM2.pod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/man7/EVP_PKEY-SM2.pod b/doc/man7/EVP_PKEY-SM2.pod index 8bdc506cec..b073dc8b05 100644 --- a/doc/man7/EVP_PKEY-SM2.pod +++ b/doc/man7/EVP_PKEY-SM2.pod @@ -38,6 +38,9 @@ Getter that returns the default digest name. B signatures can be generated by using the 'DigestSign' series of APIs, for instance, EVP_DigestSignInit(), EVP_DigestSignUpdate() and EVP_DigestSignFinal(). Ditto for the verification process by calling the 'DigestVerify' series of APIs. +Note that the SM2 algorithm requires the presence of the public key for signatures, +as such the B option must be set on any key used in signature +generation. Before computing an B signature, an B needs to be created, and an B ID must be set for it, like this: -- cgit v1.2.3