common.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation
00003  *
00004  * Author: Nikos Mavrogiannopoulos
00005  *
00006  * This file is part of GNUTLS.
00007  *
00008  * The GNUTLS library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00021  * USA
00022  *
00023  */
00024 
00025 #ifndef COMMON_H
00026 # define COMMON_H
00027 
00028 #include <gnutls.h>
00029 #include <gnutls_algorithms.h>
00030 
00031 #define MAX_STRING_LEN 512
00032 
00033 #define GNUTLS_XML_SHOW_ALL 1
00034 
00035 #define PEM_CRL "X509 CRL"
00036 #define PEM_X509_CERT "X509 CERTIFICATE"
00037 #define PEM_X509_CERT2 "CERTIFICATE"
00038 #define PEM_PKCS7 "PKCS7"
00039 #define PEM_PKCS12 "PKCS12"
00040 
00041 /* public key algorithm's OIDs
00042  */
00043 #define PK_PKIX1_RSA_OID "1.2.840.113549.1.1.1"
00044 #define PK_DSA_OID "1.2.840.10040.4.1"
00045 #define PK_GOST_R3410_94_OID "1.2.643.2.2.20"
00046 #define PK_GOST_R3410_2001_OID "1.2.643.2.2.19"
00047 
00048 /* signature OIDs
00049  */
00050 #define SIG_DSA_SHA1_OID "1.2.840.10040.4.3"
00051 #define SIG_RSA_MD5_OID "1.2.840.113549.1.1.4"
00052 #define SIG_RSA_MD2_OID "1.2.840.113549.1.1.2"
00053 #define SIG_RSA_SHA1_OID "1.2.840.113549.1.1.5"
00054 #define SIG_RSA_SHA256_OID "1.2.840.113549.1.1.11"
00055 #define SIG_RSA_SHA384_OID "1.2.840.113549.1.1.12"
00056 #define SIG_RSA_SHA512_OID "1.2.840.113549.1.1.13"
00057 #define SIG_RSA_RMD160_OID "1.3.36.3.3.1.2"
00058 #define SIG_GOST_R3410_94_OID "1.2.643.2.2.4"
00059 #define SIG_GOST_R3410_2001_OID "1.2.643.2.2.3"
00060 
00061 int MHD__gnutls_x509_der_encode (ASN1_TYPE src, const char *src_name,
00062                                  MHD_gnutls_datum_t * res, int str);
00063 
00064 int MHD__gnutls_x509_export_int (ASN1_TYPE MHD__asn1_data,
00065                                  MHD_gnutls_x509_crt_fmt_t format,
00066                                  char *pem_header, unsigned char *output_data,
00067                                  size_t * output_data_size);
00068 
00069 int MHD__gnutls_x509_read_value (ASN1_TYPE c, const char *root,
00070                                  MHD_gnutls_datum_t * ret, int str);
00071 
00072 int MHD__gnutls_x509_decode_and_read_attribute (ASN1_TYPE MHD__asn1_struct,
00073                                                 const char *where, char *oid,
00074                                                 int oid_size,
00075                                                 MHD_gnutls_datum_t * value,
00076                                                 int multi, int octet);
00077 
00078 int MHD__gnutls_x509_get_pk_algorithm (ASN1_TYPE src, const char *src_name,
00079                                        unsigned int *bits);
00080 
00081 int MHD__gnutls_asn1_copy_node (ASN1_TYPE * dst, const char *dst_name,
00082                                 ASN1_TYPE src, const char *src_name);
00083 
00084 #endif

Generated on Sun Jul 26 17:20:56 2009 for GNU libmicrohttpd by  doxygen 1.5.9