mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
committed by
Ondřej Surý
parent
7fc4f926fb
commit
b4a7bfd55e
@@ -677,24 +677,8 @@ pkcs11eddsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
|
|||||||
isc_buffer_forward(data, len);
|
isc_buffer_forward(data, len);
|
||||||
key->keydata.pkey = ec;
|
key->keydata.pkey = ec;
|
||||||
key->key_size = len;
|
key->key_size = len;
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
|
|
||||||
nomemory:
|
return (ISC_R_SUCCESS);
|
||||||
for (attr = pk11_attribute_first(ec); attr != NULL;
|
|
||||||
attr = pk11_attribute_next(ec, attr))
|
|
||||||
switch (attr->type) {
|
|
||||||
case CKA_EC_PARAMS:
|
|
||||||
case CKA_EC_POINT:
|
|
||||||
FREECURVE();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (ec->repr != NULL) {
|
|
||||||
memset(ec->repr, 0, ec->attrcnt * sizeof(*attr));
|
|
||||||
isc_mem_put(key->mctx, ec->repr, ec->attrcnt * sizeof(*attr));
|
|
||||||
}
|
|
||||||
memset(ec, 0, sizeof(*ec));
|
|
||||||
isc_mem_put(key->mctx, ec, sizeof(*ec));
|
|
||||||
return (ISC_R_NOMEMORY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
|
Reference in New Issue
Block a user