(hx509_cert_binary): return binary encoded certificate (DER format)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -2248,3 +2248,22 @@ _hx509_cert_get_eku(hx509_context context,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
hx509_cert_binary(hx509_context context, hx509_cert c, heim_octet_string *os)
|
||||||
|
{
|
||||||
|
size_t size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
os->data = NULL;
|
||||||
|
os->length = 0;
|
||||||
|
|
||||||
|
ASN1_MALLOC_ENCODE(Certificate, os->data, os->length,
|
||||||
|
_hx509_get_cert(c), &size, ret);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
if (os->length != size)
|
||||||
|
_hx509_abort("internal ASN.1 encoder error");
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user