projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add and use OPENSSL_zalloc
[openssl.git]
/
engines
/
ccgost
/
gost_pmeth.c
diff --git
a/engines/ccgost/gost_pmeth.c
b/engines/ccgost/gost_pmeth.c
index 0574d6eee4624db9ecc1ec0371fdaa9449fd5711..e70e2979db77975b345f025d769528cacacb6f49 100644
(file)
--- a/
engines/ccgost/gost_pmeth.c
+++ b/
engines/ccgost/gost_pmeth.c
@@
-24,10
+24,9
@@
static int pkey_gost_init(EVP_PKEY_CTX *ctx)
struct gost_pmeth_data *data;
EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(ctx);
struct gost_pmeth_data *data;
EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(ctx);
- data = OPENSSL_
m
alloc(sizeof(*data));
+ data = OPENSSL_
z
alloc(sizeof(*data));
if (!data)
return 0;
if (!data)
return 0;
- memset(data, 0, sizeof(*data));
if (pkey && EVP_PKEY_get0(pkey)) {
switch (EVP_PKEY_base_id(pkey)) {
case NID_id_GostR3410_2001:
if (pkey && EVP_PKEY_get0(pkey)) {
switch (EVP_PKEY_base_id(pkey)) {
case NID_id_GostR3410_2001:
@@
-309,11
+308,10
@@
static int pkey_gost_derive_init(EVP_PKEY_CTX *ctx)
/* -------- PKEY_METHOD for GOST MAC algorithm --------------------*/
static int pkey_gost_mac_init(EVP_PKEY_CTX *ctx)
{
/* -------- PKEY_METHOD for GOST MAC algorithm --------------------*/
static int pkey_gost_mac_init(EVP_PKEY_CTX *ctx)
{
- struct gost_mac_pmeth_data *data = OPENSSL_
m
alloc(sizeof(*data));
+ struct gost_mac_pmeth_data *data = OPENSSL_
z
alloc(sizeof(*data));
if (!data)
return 0;
if (!data)
return 0;
- memset(data, 0, sizeof(*data));
EVP_PKEY_CTX_set_data(ctx, data);
return 1;
}
EVP_PKEY_CTX_set_data(ctx, data);
return 1;
}