Add SM2 specific parameter and key generation
authorRichard Levitte <levitte@openssl.org>
Fri, 24 Jan 2020 16:59:03 +0000 (17:59 +0100)
committerRichard Levitte <levitte@openssl.org>
Sun, 2 Feb 2020 11:04:00 +0000 (12:04 +0100)
commit0943d5dd6179e2e824ec9a38b7ea6caa17a84ebd
treeebf6cdd309fb6a2059eb09938e26a73c52fd8060
parentf4e4382cae1fb85fec6e9aa26f65fc729a40a039
Add SM2 specific parameter and key generation

This makes it possible to generate SM2 parameters and keys like this:

    EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_SM2);
    EVP_PKEY *pkey = EVP_PKEY_new();

    EVP_PKEY_keygen_init(pctx);
    EVP_PKEY_keygen(pctx, pkey);

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/10942)
crypto/sm2/sm2_pmeth.c