gnutls_compress_int.h gnutls_session.h gnutls_priority.h gnutls_auth.h \
auth_anon.h auth_dhe_dss.h gnutls_extensions.h ext_srp.h \
gnutls_auth_int.h crypt_bcrypt.h gnutls_random.h crypt_srpsha1.h \
- cert_b64.h gnutls_srp.h auth_srp.h auth_srp_passwd.h gnutls_v2_compat.h \
+ x509_b64.h gnutls_srp.h auth_srp.h auth_srp_passwd.h gnutls_v2_compat.h \
crypt.h libgnutls-config.in libgnutls.m4 gnutls.h.in gnutls_errors_int.h \
- cert_asn1.h cert_der.h gnutls_datum.h auth_x509.h gnutls_gcry.h \
+ x509_asn1.h x509_der.h gnutls_datum.h auth_x509.h gnutls_gcry.h \
ext_dnsname.h gnutls_pk.h gnutls_record.h gnutls_cert.h \
- gnutls_privkey.h gnutls_constate.h gnutls_global.h cert_verify.h \
- gnutls_sig.h gnutls_mem.h
+ gnutls_privkey.h gnutls_constate.h gnutls_global.h x509_verify.h \
+ gnutls_sig.h gnutls_mem.h x509_extensions.h
lib_LTLIBRARIES = libgnutls.la
libgnutls_la_SOURCES = gnutls_record.c gnutls_compress.c debug.c \
gnutls_cipher.c gnutls_buffers.c gnutls_handshake.c gnutls_num.c \
gnutls_errors.c gnutls_algorithms.c gnutls_dh.c gnutls_kx.c \
gnutls_priority.c gnutls_hash_int.c gnutls_cipher_int.c \
- gnutls_compress_int.c gnutls_session.c gnutls_db.c cert_b64.c \
+ gnutls_compress_int.c gnutls_session.c gnutls_db.c x509_b64.c \
auth_anon.c auth_dhe_dss.c gnutls_extensions.c ext_srp.c gnutls_auth.c \
crypt_bcrypt.c crypt.c gnutls_random.c crypt_srpsha1.c gnutls_srp.c \
auth_srp.c auth_srp_passwd.c gnutls_v2_compat.c auth_srp_sb64.c \
- cert_ASN.y cert_asn1.c cert_der.c gnutls_datum.c auth_rsa.c \
- gnutls_gcry.c ext_dnsname.c gnutls_pk.c gnutls_cert.c cert_verify.c\
+ x509_ASN.y x509_asn1.c x509_der.c gnutls_datum.c auth_rsa.c \
+ gnutls_gcry.c ext_dnsname.c gnutls_pk.c gnutls_cert.c x509_verify.c\
gnutls_global.c gnutls_privkey.c gnutls_constate.c gnutls_anon_cred.c \
- gnutls_sig_check.c pkix_asn1_tab.c pkcs1_asn1_tab.c gnutls_mem.c
+ gnutls_sig_check.c pkix_asn1_tab.c pkcs1_asn1_tab.c gnutls_mem.c \
+ x509_extensions.c
libgnutls_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
#include "gnutls_errors.h"
#include "gnutls_dh.h"
#include "gnutls_num.h"
-#include "cert_asn1.h"
-#include "cert_der.h"
+#include "x509_asn1.h"
+#include "x509_der.h"
#include "gnutls_datum.h"
#include "auth_x509.h"
#include <gnutls_random.h>
#include <gnutls_pk.h>
#include <gnutls_algorithms.h>
#include <gnutls_global.h>
-#include <cert_verify.h>
+#include <x509_verify.h>
#include "debug.h"
int gen_rsa_certificate(GNUTLS_KEY, opaque **);
/* Functions for operating in an SRP passwd file are included here */
#include "gnutls_int.h"
-#include "cert_b64.h"
+#include "x509_b64.h"
#include "gnutls_errors.h"
#include "auth_srp_passwd.h"
#include "auth_srp.h"
#include <gnutls_int.h>
#include <gnutls_errors.h>
-#include <cert_b64.h>
+#include <x509_b64.h>
#include <auth_x509.h>
#include <gnutls_cert.h>
-#include <cert_asn1.h>
-#include <cert_der.h>
+#include <x509_asn1.h>
+#include <x509_der.h>
#include <gnutls_datum.h>
#include <gnutls_gcry.h>
#include <gnutls_privkey.h>
#include <gnutls_global.h>
-#include <cert_verify.h>
-#include <gnutls_num.h>
+#include <x509_verify.h>
+#include <x509_extensions.h>
/* KX mappings to PK algorithms */
typedef struct {
/* this function will convert up to 3 digit
* numbers to characters.
*/
-#define MAX_INT_DIGITS 4
void _gnutls_int2str(int k, char* data) {
if (k > 999) data[0] = 0;
else sprintf( data, "%d", k);
return GNUTLS_E_ASN1_PARSING_ERROR;
}
-/* Here we only read subjectAltName, in case of
- * dnsName. Otherwise we read nothing.
- */
-static int _extract_subjectAltName( char* subjectAltName, opaque* extnValue, int extnValueLen) {
-node_asn* ext;
-char counter[MAX_INT_DIGITS];
-char name[1024];
-char str[1024];
-int len, k, result;
-
- subjectAltName[0] = 0;
-
- if (asn1_create_structure
- ( _gnutls_get_pkix(), "PKIX1Implicit88.GeneralNames", &ext,
- "san") != ASN_OK) {
- gnutls_assert();
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- result = asn1_get_der ( ext, extnValue, extnValueLen);
-
- if (result != ASN_OK) {
- gnutls_assert();
- asn1_delete_structure(ext);
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- k = 1;
- for (;;) {
- strcpy(name, "san.?");
- _gnutls_int2str(k, counter);
- strcat(name, counter);
-
- len = sizeof(str) - 1;
- result = asn1_read_value(ext, name, str, &len);
- if (result == ASN_ELEMENT_NOT_FOUND) break;
-
- if (strcmp( str, "dNSName") == 0) {
- strcat( name, "dNSName");
- len = sizeof( str) -1;
- result = asn1_read_value(ext, name, str, &len);
-
- if (result != ASN_OK) {
- gnutls_assert();
- asn1_delete_structure(ext);
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- strncpy( subjectAltName, str, GMIN( len, X509_CN_SIZE-1));
- subjectAltName[X509_CN_SIZE-1] = 0;
-
- break;
- }
- k++;
- }
-
- asn1_delete_structure(ext);
- return 0;
-}
-
-/* Here we only extract the KeyUsage field
- */
-static int _extract_keyUsage( char* keyUsage, opaque* extnValue, int extnValueLen) {
-node_asn* ext;
-char str[128];
-int len, result;
-
-
- if (asn1_create_structure
- ( _gnutls_get_pkix(), "PKIX1Implicit88.KeyUsage", &ext,
- "ku") != ASN_OK) {
- gnutls_assert();
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- result = asn1_get_der ( ext, extnValue, extnValueLen);
-
- if (result != ASN_OK) {
- gnutls_assert();
- asn1_delete_structure(ext);
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- len = sizeof(str) - 1;
- result = asn1_read_value(ext, "ku", str, &len);
- if (result != ASN_OK) {
- gnutls_assert();
- asn1_delete_structure(ext);
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- keyUsage[0] = str[0];
-
- asn1_delete_structure(ext);
-
- return 0;
-}
-
-
-static int _parse_extension( gnutls_cert* cert, char* extnID, char* critical, char* extnValue, int extnValueLen) {
-
- if (strcmp( extnID, "2 5 29 14")==0) { /* subject Key ID */
- /* we don't use it */
- return 0;
- }
-
- if (strcmp( extnID, "2 5 29 15")==0) { /* Key Usage */
- return _extract_keyUsage( &cert->keyUsage, extnValue, extnValueLen);
- }
-
- if (strcmp( extnID, "2 5 29 19")==0) { /* Basic Constraints */
- /* we don't use it */
- return 0;
- }
-
- if (strcmp( extnID, "2 5 29 17")==0) { /* subjectAltName */
- return _extract_subjectAltName( cert->subjectAltName, extnValue, extnValueLen);
- }
-
-#ifdef DEBUG
- _gnutls_log("CERT[%s]: Unsupported Extension: %s, %s\n", cert->cert_info.common_name, extnID, critical);
-#endif
-
- if (strcmp( critical, "TRUE")==0) {
- gnutls_assert();
- return GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION;
- }
- return 0;
-
-}
-
-/* This function will attempt to parse Extensions in
- * an X509v3 certificate
- */
-static int _get_Ext_type( node_asn *rasn, char *root, gnutls_cert *cert)
-{
- int k, result, len;
- char name[128], name2[128], counter[MAX_INT_DIGITS];
- char str[1024];
- char critical[10];
- char extnID[128];
- char extnValue[128];
-
- k = 0;
- do {
- k++;
-
- strcpy(name, root);
- strcat(name, ".?");
- _gnutls_int2str(k, counter);
- strcat(name, counter);
-
- len = sizeof(str) - 1;
- result = asn1_read_value( rasn, name, str, &len);
-
- /* move to next
- */
-
- if (result==ASN_ELEMENT_NOT_FOUND) break;
-
- do {
-
- strcpy(name2, name);
- strcat(name2, ".extnID");
-
- len = sizeof(extnID) - 1;
- result = asn1_read_value( rasn, name2, extnID, &len);
-
- if (result==ASN_ELEMENT_NOT_FOUND) break;
- else
- if (result != ASN_OK) {
- gnutls_assert();
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- strcpy(name2, name);
- strcat(name2, ".critical");
-
- len = sizeof(critical) - 1;
- result = asn1_read_value( rasn, name2, critical, &len);
-
- if (result==ASN_ELEMENT_NOT_FOUND) break;
- else
- if (result != ASN_OK) {
- gnutls_assert();
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- strcpy(name2, name);
- strcat(name2, ".extnValue");
-
- len = sizeof( extnValue) - 1;
- result = asn1_read_value( rasn, name2, extnValue, &len);
-
- if (result==ASN_ELEMENT_NOT_FOUND) break;
- else
- if (result != ASN_OK) {
- gnutls_assert();
- return GNUTLS_E_ASN1_PARSING_ERROR;
- }
-
- /* Handle Extension */
- if ( (result=_parse_extension( cert, extnID, critical, extnValue, len)) < 0) {
- gnutls_assert();
- return result;
- }
-
-
- } while (0);
- } while (1);
-
- if (result==ASN_ELEMENT_NOT_FOUND)
- return 0;
- else
- return GNUTLS_E_ASN1_PARSING_ERROR;
-}
#define MAX_TIME 1024
}
if ((result =
- _get_Ext_type( c2, "certificate2.tbsCertificate.extensions", gCert)) < 0) {
+ _gnutls_get_ext_type( c2, "certificate2.tbsCertificate.extensions", gCert)) < 0) {
gnutls_assert();
asn1_delete_structure(c2);
return result;
int valid; /* 0 if the certificate looks good.
*/
+
+ int CA; /* 0 if the certificate does not belong to
+ * a certificate authority. 1 otherwise.
+ */
gnutls_datum raw; /* the raw certificate */
} gnutls_cert;
int _gnutls_cert2gnutlsCert(gnutls_cert * gCert, gnutls_datum derCert);
gnutls_cert* _gnutls_find_cert( gnutls_cert** cert_list, int cert_list_length, char* name);
+#define MAX_INT_DIGITS 4
+void _gnutls_int2str(int k, char* data);
+
#endif
#include <gnutls_int.h>
#include <gnutls_errors.h>
-#include <cert_asn1.h>
+#include <x509_asn1.h>
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
-#include <cert_asn1.h>
+#ifndef GNUTLS_GLOBAL_H
+# define GNUTLS_GLOBAL_H
+
+#include <x509_asn1.h>
int gnutls_is_secure_memory(const void* mem);
node_asn* _gnutls_get_pkcs();
node_asn* _gnutls_get_pkix();
+
+#endif
#include <gnutls_int.h>
#include <gnutls_errors.h>
-#include <cert_b64.h>
+#include <x509_b64.h>
#include <auth_x509.h>
#include <gnutls_cert.h>
-#include <cert_asn1.h>
-#include <cert_der.h>
+#include <x509_asn1.h>
+#include <x509_der.h>
#include <gnutls_datum.h>
#include <gnutls_gcry.h>
#include <gnutls_global.h>
#include <gnutls_int.h>
#include <gnutls_errors.h>
-#include <cert_b64.h>
+#include <x509_b64.h>
#include <auth_x509.h>
#include <gnutls_cert.h>
-#include <cert_asn1.h>
-#include <cert_der.h>
+#include <x509_asn1.h>
+#include <x509_der.h>
#include <gnutls_datum.h>
#include <gnutls_gcry.h>
#include <gnutls_privkey.h>
-#include "cert_asn1.h"
+#include "x509_asn1.h"
const static_asn pkcs1_asn1_tab[]={
{"PKCS-1",536872976,0},
-#include "cert_asn1.h"
+#include "x509_asn1.h"
const static_asn pkix_asn1_tab[]={
{"PKIX1Implicit88",536875024,0},
/*****************************************************/
-/* File: cert_ASN.y */
+/* File: x509_ASN.y */
/* Description: input file for 'bison' program. */
/* The output file is a parser (in C language) for */
/* ASN.1 syntax */
%{
#include <gnutls_int.h>
-#include "cert_asn1.h"
+#include "x509_asn1.h"
FILE *file_asn1; /* Pointer to file to parse */
extern int parse_mode;
/*****************************************************/
-/* File: cert_asn1.c */
+/* File: x509_asn1.c */
/* Description: Functions to manage ASN.1 DEFINITIONS*/
/*****************************************************/
#include <gnutls_int.h>
-#include "cert_asn1.h"
-#include "cert_der.h"
+#include "x509_asn1.h"
+#include "x509_der.h"
#define UP 1
if(file==NULL) return ASN_FILE_NOT_FOUND;
- fprintf(file,"\n#include \"cert_asn1.h\"\n\n");
+ fprintf(file,"\n#include \"x509_asn1.h\"\n\n");
fprintf(file,"const static_asn %s[]={\n",structure_name);
p=pointer;
/*****************************************************/
-/* File: cert_der.c */
+/* File: x509_der.c */
/* Description: Functions to manage DER encoding */
/*****************************************************/
#include <gnutls_int.h> /* for memory debugging - and types */
-#include "cert_der.h"
-#include "cert_asn1.h"
+#include "x509_der.h"
+#include "x509_asn1.h"
#define TAG_BOOLEAN 0x01
#ifndef _GNUTLS_DER_H
#define _GNUTLS_DER_H
-#include "cert_asn1.h"
+#include "x509_asn1.h"
#define UNIVERSAL 0x00
#define APPLICATION 0x40
--- /dev/null
+/*
+ * Copyright (C) 2001 Nikos Mavroyanopoulos
+ *
+ * This file is part of GNUTLS.
+ *
+ * GNUTLS is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNUTLS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <gnutls_int.h>
+#include <x509_asn1.h>
+#include <x509_der.h>
+#include <gnutls_num.h>
+#include <gnutls_cert.h>
+#include <gnutls_errors.h>
+#include <gnutls_global.h>
+
+/* Here we only read subjectAltName, in case of
+ * dnsName. Otherwise we read nothing.
+ */
+static int _extract_subjectAltName( char* subjectAltName, opaque* extnValue, int extnValueLen) {
+node_asn* ext;
+char counter[MAX_INT_DIGITS];
+char name[1024];
+char str[1024];
+int len, k, result;
+
+ subjectAltName[0] = 0;
+
+ if (asn1_create_structure
+ ( _gnutls_get_pkix(), "PKIX1Implicit88.GeneralNames", &ext,
+ "san") != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ result = asn1_get_der ( ext, extnValue, extnValueLen);
+
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ k = 1;
+ for (;;) {
+ strcpy(name, "san.?");
+ _gnutls_int2str(k, counter);
+ strcat(name, counter);
+
+ len = sizeof(str) - 1;
+ result = asn1_read_value(ext, name, str, &len);
+ if (result == ASN_ELEMENT_NOT_FOUND) break;
+
+ if (strcmp( str, "dNSName") == 0) {
+ strcat( name, "dNSName");
+ len = sizeof( str) -1;
+ result = asn1_read_value(ext, name, str, &len);
+
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ strncpy( subjectAltName, str, GMIN( len, X509_CN_SIZE-1));
+ subjectAltName[X509_CN_SIZE-1] = 0;
+
+ break;
+ }
+ k++;
+ }
+
+ asn1_delete_structure(ext);
+ return 0;
+}
+
+/* Here we only extract the KeyUsage field
+ */
+static int _extract_keyUsage( char* keyUsage, opaque* extnValue, int extnValueLen) {
+node_asn* ext;
+char str[128];
+int len, result;
+
+
+ if (asn1_create_structure
+ ( _gnutls_get_pkix(), "PKIX1Implicit88.KeyUsage", &ext,
+ "ku") != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ result = asn1_get_der ( ext, extnValue, extnValueLen);
+
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ len = sizeof(str) - 1;
+ result = asn1_read_value(ext, "ku", str, &len);
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ keyUsage[0] = str[0];
+
+ asn1_delete_structure(ext);
+
+ return 0;
+}
+
+static int _extract_basicConstraints( int* CA, opaque* extnValue, int extnValueLen) {
+node_asn* ext;
+char str[128];
+int len, result;
+
+
+ if (asn1_create_structure
+ ( _gnutls_get_pkix(), "PKIX1Implicit88.BasicConstraints", &ext,
+ "bc") != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ result = asn1_get_der ( ext, extnValue, extnValueLen);
+
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ len = sizeof(str) - 1;
+ result = asn1_read_value(ext, "bc.cA", str, &len);
+ if (result != ASN_OK) {
+ gnutls_assert();
+ asn1_delete_structure(ext);
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ asn1_delete_structure(ext);
+
+ if ( strcmp(str, "TRUE")==0) *CA = 1;
+ else *CA = 0;
+
+
+ return 0;
+}
+
+
+static int _parse_extension( gnutls_cert* cert, char* extnID, char* critical, char* extnValue, int extnValueLen) {
+
+ if (strcmp( extnID, "2 5 29 14")==0) { /* subject Key ID */
+ /* we don't use it */
+ return 0;
+ }
+
+ if (strcmp( extnID, "2 5 29 15")==0) { /* Key Usage */
+ return _extract_keyUsage( &cert->keyUsage, extnValue, extnValueLen);
+ }
+
+ if (strcmp( extnID, "2 5 29 19")==0) { /* Basic Constraints */
+ /* actually checks if a certificate belongs to
+ * a Certificate Authority.
+ */
+ return _extract_basicConstraints( &cert->CA, extnValue, extnValueLen);
+ }
+
+ if (strcmp( extnID, "2 5 29 17")==0) { /* subjectAltName */
+ return _extract_subjectAltName( cert->subjectAltName, extnValue, extnValueLen);
+ }
+
+#ifdef DEBUG
+ _gnutls_log("CERT[%s]: Unsupported Extension: %s, %s\n", cert->cert_info.common_name, extnID, critical);
+#endif
+
+ if (strcmp( critical, "TRUE")==0) {
+ gnutls_assert();
+ return GNUTLS_E_X509_UNSUPPORTED_CRITICAL_EXTENSION;
+ }
+ return 0;
+
+}
+
+/* This function will attempt to parse Extensions in
+ * an X509v3 certificate
+ */
+int _gnutls_get_ext_type( node_asn *rasn, char *root, gnutls_cert *cert)
+{
+ int k, result, len;
+ char name[128], name2[128], counter[MAX_INT_DIGITS];
+ char str[1024];
+ char critical[10];
+ char extnID[128];
+ char extnValue[128];
+
+ k = 0;
+ do {
+ k++;
+
+ strcpy(name, root);
+ strcat(name, ".?");
+ _gnutls_int2str(k, counter);
+ strcat(name, counter);
+
+ len = sizeof(str) - 1;
+ result = asn1_read_value( rasn, name, str, &len);
+
+ /* move to next
+ */
+
+ if (result==ASN_ELEMENT_NOT_FOUND) break;
+
+ do {
+
+ strcpy(name2, name);
+ strcat(name2, ".extnID");
+
+ len = sizeof(extnID) - 1;
+ result = asn1_read_value( rasn, name2, extnID, &len);
+
+ if (result==ASN_ELEMENT_NOT_FOUND) break;
+ else
+ if (result != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ strcpy(name2, name);
+ strcat(name2, ".critical");
+
+ len = sizeof(critical) - 1;
+ result = asn1_read_value( rasn, name2, critical, &len);
+
+ if (result==ASN_ELEMENT_NOT_FOUND) break;
+ else
+ if (result != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ strcpy(name2, name);
+ strcat(name2, ".extnValue");
+
+ len = sizeof( extnValue) - 1;
+ result = asn1_read_value( rasn, name2, extnValue, &len);
+
+ if (result==ASN_ELEMENT_NOT_FOUND) break;
+ else
+ if (result != ASN_OK) {
+ gnutls_assert();
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+ }
+
+ /* Handle Extension */
+ if ( (result=_parse_extension( cert, extnID, critical, extnValue, len)) < 0) {
+ gnutls_assert();
+ return result;
+ }
+
+
+ } while (0);
+ } while (1);
+
+ if (result==ASN_ELEMENT_NOT_FOUND)
+ return 0;
+ else
+ return GNUTLS_E_ASN1_PARSING_ERROR;
+}
--- /dev/null
+int _gnutls_get_ext_type( node_asn *rasn, char *root, gnutls_cert *cert);
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_cert.h"
-#include "cert_asn1.h"
-#include "cert_der.h"
+#include "x509_asn1.h"
+#include "x509_der.h"
#include "gnutls_global.h"
#include "gnutls_num.h" /* GMAX */
#include <gnutls_sig.h>