(pk_mk_pa_reply_dh): encode the DH public key with asn1 wrapping
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16822 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
10
kdc/pkinit.c
10
kdc/pkinit.c
@@ -811,14 +811,10 @@ pk_mk_pa_reply_dh(krb5_context context,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
buf.length = length_heim_integer(&i);
|
ASN1_MALLOC_ENCODE(DHPublicKey, buf.data, buf.length, &i, &size, ret);
|
||||||
buf.data = malloc(buf.length);
|
|
||||||
if (buf.data == NULL) {
|
|
||||||
krb5_clear_error_string(context);
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
ret = der_put_heim_integer(buf.data, buf.length, &i, &size);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
krb5_set_error_string(context, "ASN.1 encoding of "
|
||||||
|
"DHPublicKey failed (%d)", ret);
|
||||||
krb5_clear_error_string(context);
|
krb5_clear_error_string(context);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user