I am unable to extract the certificate version information using the 
following code. I always get 0 for the certificate version while the 
expected value is 2 (in most cases).

int i=0;
Int8 *ptr;
err = SslContextGet_PeerCert(sslLibRef,context,&cert );
if(cert != NULL)
{
        for(;i<cert->num;i++)
        {
                if(cert->eitem[i].type == asn1ExItemTypeX509)
                {
                        if(cert->eitem[i].field == asn1FldX509Version)
                        {
                                ptr = ((Int8 *)cert) + 
cert->eitem[i].offset;
                                // Both *ptr and *(ptr +1) has values 0 
and cert->eitem[i].len = 2
                                break;
                        }
                }
        }
}

Has anybody come across the same issue ?

thanks & regards,
rajan


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to