kuser/kx509.c: Fix add1_2chain.

This commit is contained in:
Roland C. Dowdeswell
2019-11-26 19:33:41 +00:00
committed by Nico Williams
parent 62d13ebf28
commit 8c5d2f7cc4

View File

@@ -118,12 +118,10 @@ add1_2chain(hx509_context hx509ctx, void *d, hx509_cert cert)
krb5_error_code ret; krb5_error_code ret;
Certificates *cs = d; Certificates *cs = d;
Certificate c; Certificate c;
size_t len;
ret = hx509_cert_binary(hx509ctx, cert, &os); ret = hx509_cert_binary(hx509ctx, cert, &os);
if (ret == 0) if (ret == 0)
ASN1_MALLOC_ENCODE(Certificate, os.data, os.length, &c, &len, ret); ret = decode_Certificate(os.data, os.length, &c, NULL);
der_free_octet_string(&os); der_free_octet_string(&os);
if (ret == 0) { if (ret == 0) {
add_Certificates(cs, &c); add_Certificates(cs, &c);