- Added support for big serial numbers in certificates

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@332 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
jey 2002-03-15 10:10:33 +00:00
parent 3838af2bd7
commit 67ffdfa213
3 changed files with 7 additions and 5 deletions

View File

@ -101,11 +101,12 @@ struct sc_pkcs15_pubkey_rsa {
struct sc_pkcs15_cert {
int version;
unsigned long serial;
u8 *serial;
size_t serial_len;
struct sc_pkcs15_pubkey_rsa key;
u8 *data; /* DER encoded raw cert */
int data_len;
size_t data_len;
};
struct sc_pkcs15_cert_info {

View File

@ -68,7 +68,7 @@ static int parse_x509_cert(struct sc_context *ctx, const u8 *buf, size_t buflen,
};
struct sc_asn1_entry asn1_tbscert[] = {
{ "version", SC_ASN1_STRUCT, SC_ASN1_CTX | 0 | SC_ASN1_CONS, 0, asn1_version },
{ "serialNumber", SC_ASN1_INTEGER, ASN1_INTEGER, 0, &cert->serial },
{ "serialNumber", SC_ASN1_OCTET_STRING, ASN1_INTEGER, SC_ASN1_ALLOC, &cert->serial, &cert->serial_len },
{ "signature", SC_ASN1_STRUCT, ASN1_SEQUENCE | SC_ASN1_CONS, 0, NULL },
{ "issuer", SC_ASN1_STRUCT, ASN1_SEQUENCE | SC_ASN1_CONS, 0, NULL },
{ "validity", SC_ASN1_STRUCT, ASN1_SEQUENCE | SC_ASN1_CONS, 0, NULL },

View File

@ -101,11 +101,12 @@ struct sc_pkcs15_pubkey_rsa {
struct sc_pkcs15_cert {
int version;
unsigned long serial;
u8 *serial;
size_t serial_len;
struct sc_pkcs15_pubkey_rsa key;
u8 *data; /* DER encoded raw cert */
int data_len;
size_t data_len;
};
struct sc_pkcs15_cert_info {