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

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

154
155
156
157
158
159
160








161

162
163


164
165
166
167
168
169
170
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

169
170

171
172
173
174
175
176
177
178
179







+
+
+
+
+
+
+
+
-
+

-
+
+







		CACKEY_DEBUG_PRINTF("Failed at reading the certificate from the contents");

		return(-1);
	}

	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);
	if (read_ret != 0) {
		/* Try again without a version tag (X.509v1) */
		outbuf->version.tag = 0;
		outbuf->version.size = 0;
		outbuf->version.contents = NULL;
		outbuf->version.asn1rep_len = 0;
		outbuf->version.asn1rep = NULL;
		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);
		if (read_ret != 0) {
		CACKEY_DEBUG_PRINTF("Failed at reading the certificate components from the certificate");
			CACKEY_DEBUG_PRINTF("Failed at reading the certificate components from the certificate");

		return(-1);
			return(-1);
		}
	}

	read_ret = asn1_x509_read_asn1_object(outbuf->pubkeyinfo.contents, outbuf->pubkeyinfo.size, &outbuf->pubkey_algoid, &outbuf->pubkey, NULL);
	if (read_ret != 0) {
		CACKEY_DEBUG_PRINTF("Failed at reading the public key from the certificate components");

		return(-1);