diff options
author | Stef Walter <stefw@gnome.org> | 2012-12-17 12:51:53 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-02-05 14:54:53 +0100 |
commit | c2dcd0b3cb1ccac4eff98044d43d3f8696094644 (patch) | |
tree | bd3642166ead8a619247b6268ad7dac444c9472a /common | |
parent | a286df75050db8b306685cb22e491d11be842584 (diff) |
Add support for openssl TRUSTED CERTIFICATE PEM files
Diffstat (limited to 'common')
-rw-r--r-- | common/Makefile.am | 2 | ||||
-rw-r--r-- | common/openssl.asn | 28 | ||||
-rw-r--r-- | common/openssl.asn.h | 28 |
3 files changed, 58 insertions, 0 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index 00c043b..d527e95 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -41,11 +41,13 @@ noinst_LTLIBRARIES += \ libp11_data_la_SOURCES = \ base64.c base64.h \ checksum.c checksum.h \ + openssl.asn openssl.asn.h \ pem.c pem.h \ pkix.asn pkix.asn.h \ $(NULL) asn: asn1Parser -o pkix.asn.h pkix.asn + asn1Parser -o openssl.asn.h openssl.asn endif # WITH_ASN1 diff --git a/common/openssl.asn b/common/openssl.asn new file mode 100644 index 0000000..c1f452b --- /dev/null +++ b/common/openssl.asn @@ -0,0 +1,28 @@ + +OPENSSL { } + +DEFINITIONS IMPLICIT TAGS ::= + +BEGIN + +-- This module contains structures specific to OpenSSL + +CertAux ::= SEQUENCE { + trust SEQUENCE OF OBJECT IDENTIFIER OPTIONAL, + reject [0] SEQUENCE OF OBJECT IDENTIFIER OPTIONAL, + alias UTF8String OPTIONAL, + keyid OCTET STRING OPTIONAL, + other [1] SEQUENCE OF AlgorithmIdentifier OPTIONAL +} + +-- Dependencies brought in from other modules + +AlgorithmIdentifier ::= SEQUENCE { + algorithm OBJECT IDENTIFIER, + parameters ANY DEFINED BY algorithm OPTIONAL +} + +UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING + -- The content of this type conforms to RFC 2279. + +END diff --git a/common/openssl.asn.h b/common/openssl.asn.h new file mode 100644 index 0000000..4e6b240 --- /dev/null +++ b/common/openssl.asn.h @@ -0,0 +1,28 @@ +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include <libtasn1.h> + +const ASN1_ARRAY_TYPE openssl_asn1_tab[] = { + { "OPENSSL", 536875024, NULL }, + { NULL, 1073741836, NULL }, + { "CertAux", 1610612741, NULL }, + { "trust", 1610629131, NULL }, + { NULL, 12, NULL }, + { "reject", 1610637323, NULL }, + { NULL, 1073745928, "0"}, + { NULL, 12, NULL }, + { "alias", 1073758210, "UTF8String"}, + { "keyid", 1073758215, NULL }, + { "other", 536895499, NULL }, + { NULL, 1073745928, "1"}, + { NULL, 2, "AlgorithmIdentifier"}, + { "AlgorithmIdentifier", 1610612741, NULL }, + { "algorithm", 1073741836, NULL }, + { "parameters", 541081613, NULL }, + { "algorithm", 1, NULL }, + { "UTF8String", 536879111, NULL }, + { NULL, 4360, "12"}, + { NULL, 0, NULL } +}; |