1 /* A couple of copying functions which are required by the Heimdal crypto code,
2 * but where pulling in the whole Heimdal source file containing them leads
3 * to unecessary complexity */
8 der_copy_octet_string (const krb5_data
*from
, krb5_data
*to
)
10 to
->length
= from
->length
;
11 to
->data
= malloc(to
->length
);
12 if(to
->length
!= 0 && to
->data
== NULL
)
14 memcpy(to
->data
, from
->data
, to
->length
);
19 copy_EncryptionKey(const krb5_keyblock
*from
, krb5_keyblock
*to
)
21 memset(to
, 0, sizeof(*to
));
22 to
->keytype
= from
->keytype
;
23 return der_copy_octet_string(&from
->keyvalue
, &to
->keyvalue
);
27 free_Checksum(Checksum
*data
)
29 krb5_data_free(&data
->checksum
);