- switch (EVP_PKEY_base_id(pkey)) {
- case NID_id_GostR3410_2012_512:
- case NID_id_GostR3410_2012_256:
- case NID_id_GostR3410_2001:
- {
- EC_KEY *ec = EVP_PKEY_get0((EVP_PKEY *)pkey);
- if (ec)
- return (BIGNUM *)EC_KEY_get0_private_key(ec);
- break;
- }
- }
+ int id =EVP_PKEY_base_id(pkey);
+
+ if (id == NID_gost2012_512 ||
+ id == NID_gost2012_256||
+ id == NID_id_GostR3410_2001)
+ {
+ EC_KEY *ec = EVP_PKEY_get0((EVP_PKEY *)pkey);
+ if (ec)
+ return (BIGNUM *)EC_KEY_get0_private_key(ec);
+ }