Check-in [899318c012]
Overview
SHA1:899318c0129f4201a719bd49da7c48396d0cda73
Date: 2016-03-15 17:57:40
User: rkeene
Comment:Updated to parse X.509v1 implied version certificates
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-04-14
17:07
[c3e0c9025e] Updated to use NaCl libpcsc (in progress) (user: rkeene, tags: trunk)
2016-03-15
17:57
[899318c012] Updated to parse X.509v1 implied version certificates (user: rkeene, tags: trunk)
2016-03-09
04:53
[e99cc9c924] ChromeOS: Updated to deal with the UI if the smartcard manager app isn't running (user: rkeene, tags: trunk)
Changes

Modified asn1-x509.c from [1388b83376] to [589998a327].

   154    154   		CACKEY_DEBUG_PRINTF("Failed at reading the certificate from the contents");
   155    155   
   156    156   		return(-1);
   157    157   	}
   158    158   
   159    159   	read_ret = asn1_x509_read_asn1_object(outbuf->certificate.contents, outbuf->certificate.size, &outbuf->version, &outbuf->serial_number, &outbuf->signature_algo, &outbuf->issuer, &outbuf->validity, &outbuf->subject, &outbuf->pubkeyinfo, NULL);
   160    160   	if (read_ret != 0) {
   161         -		CACKEY_DEBUG_PRINTF("Failed at reading the certificate components from the certificate");
          161  +		/* Try again without a version tag (X.509v1) */
          162  +		outbuf->version.tag = 0;
          163  +		outbuf->version.size = 0;
          164  +		outbuf->version.contents = NULL;
          165  +		outbuf->version.asn1rep_len = 0;
          166  +		outbuf->version.asn1rep = NULL;
          167  +		read_ret = asn1_x509_read_asn1_object(outbuf->certificate.contents, outbuf->certificate.size, &outbuf->serial_number, &outbuf->signature_algo, &outbuf->issuer, &outbuf->validity, &outbuf->subject, &outbuf->pubkeyinfo, NULL);
          168  +		if (read_ret != 0) {
          169  +			CACKEY_DEBUG_PRINTF("Failed at reading the certificate components from the certificate");
   162    170   
   163         -		return(-1);
          171  +			return(-1);
          172  +		}
   164    173   	}
   165    174   
   166    175   	read_ret = asn1_x509_read_asn1_object(outbuf->pubkeyinfo.contents, outbuf->pubkeyinfo.size, &outbuf->pubkey_algoid, &outbuf->pubkey, NULL);
   167    176   	if (read_ret != 0) {
   168    177   		CACKEY_DEBUG_PRINTF("Failed at reading the public key from the certificate components");
   169    178   
   170    179   		return(-1);