It doesn't return a POLICYINFO pointer. It returns a
STACK_OF(POLICYINFO) pointer.
Sorry.
You're right, off course, so now it works just fine.
I guess when you get more experienced with OpenSSL/extension it will be more
obvious what type is returned from X509_get_ext_d2i().
Thanks a lot!
K
"Hellan,Kim KHE" wrote:
>
>
> Thanks!
> But this function doesn't seem to return the correct pointer.
> I have the following code:
>
> int iCrit;
> POLICYINFO* pinfo;
> pinfo = (POLICYINFO*) X509_get_ext_d2i(pCert, NID_certificate_policies,
> &iCrit, NULL);
>
> BIO* bioID = BIO_new( BIO_s_mem(
"Hellan,Kim KHE" wrote:
>
> OpenSSL sees the X509v3 Certificate Policies extension as a "raw"
extension,
> but how do I extract "field" values (like PolicyIdentifier or UserNotice)
> from such an extension?
You do this the same as any other extension. Use X509_get_ext_d2i(), see
the docs in doc
"Hellan,Kim KHE" wrote:
>
> I have a certificate with an X509v3 Certificate Policies extension.
> That extension contains a PolicyIdentifier "field" from which I want to
> extract the value.
>
> OpenSSL sees the X509v3 Certificate Policies extension as a "raw" extension,
> but how do I extract "
I have a certificate with an X509v3 Certificate Policies extension.
That extension contains a PolicyIdentifier "field" from which I want to
extract the value.
OpenSSL sees the X509v3 Certificate Policies extension as a "raw" extension,
but how do I extract "field" values (like PolicyIdentifier or