}
if ((*out_len = i2d_GOST_KEY_TRANSPORT(gkt, out ? &out : NULL)) > 0)
ret = 1;
+ OPENSSL_cleanse(shared_key, sizeof(shared_key));
GOST_KEY_TRANSPORT_free(gkt);
return ret;
err:
+ OPENSSL_cleanse(shared_key, sizeof(shared_key));
if (key_is_ephemeral)
EVP_PKEY_free(sec_key);
GOST_KEY_TRANSPORT_free(gkt);
if ((*out_len = i2d_PSKeyTransport_gost(pst, out ? &out : NULL)) > 0)
ret = 1;
err:
+ OPENSSL_cleanse(expkeys, sizeof(expkeys));
if (key_is_ephemeral)
EVP_PKEY_free(sec_key);
ret = 1;
err:
+ OPENSSL_cleanse(sharedKey, sizeof(sharedKey));
EVP_PKEY_free(eph_key);
GOST_KEY_TRANSPORT_free(gkt);
return ret;
ret = 1;
err:
+ OPENSSL_cleanse(expkeys, sizeof(expkeys));
EVP_PKEY_free(eph_key);
PSKeyTransport_gost_free(pst);
return ret;