<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">That's great, thanks Rainer. I'll give those a try.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Rich.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 March 2016 at 14:41, Rainer Jung <span dir="ltr"><<a href="mailto:rainer.jung@kippdata.de" target="_blank">rainer.jung@kippdata.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Am 13.03.2016 um 14:34 schrieb Richard Moore:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm currently testing the new release by trying to port Qt to use it<br>
(with the compatibility stuff disabled). Here are the first problems<br>
I've hit:<br>
<br>
How do we get the certificate serial number? We were doing<br>
x509->cert_info->serialNumber to get it as an ASN1_INTEGER.<br>
</blockquote>
<br></span>
ASN1_INTEGER *X509_get_serialNumber(X509 *x);<br>
<br>
implemented in crypto/x509/x509_cmp.c:<br>
<br>
ASN1_INTEGER *X509_get_serialNumber(X509 *a)<br>
{<br>
    return &a->cert_info.serialNumber;<span class=""><br>
}<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="https://www.openssl.org/docs/manmaster/crypto/EVP_PKEY_type.html" rel="noreferrer" target="_blank">https://www.openssl.org/docs/manmaster/crypto/EVP_PKEY_type.html</a> says:<br>
"EVP_PKEY_type() returns the type of key corresponding to the value<br>
type. The type of a key can be obtained with EVP_PKEY_type(pkey->type)."<br>
except it can't<br>
because the structure is now opaque.<br>
</blockquote>
<br></span>
The docs should be fixed, but there's:<br>
<br>
int EVP_PKEY_id(const EVP_PKEY *pkey);<br>
int EVP_PKEY_base_id(const EVP_PKEY *pkey);<br>
<br>
implemented in crypto/evp/p_lib.c:<br>
<br>
int EVP_PKEY_id(const EVP_PKEY *pkey)<br>
{<br>
    return pkey->type;<br>
}<br>
<br>
int EVP_PKEY_base_id(const EVP_PKEY *pkey)<br>
{<br>
    return EVP_PKEY_type(pkey->type);<br>
}<br>
<br>
HTH<br>
<br>
Regards,<br>
<br>
Rainer<span class="HOEnZb"><font color="#888888"><br>
-- <br>
openssl-dev mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-dev" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-dev</a><br>
</font></span></blockquote></div><br></div>