From: Simon Josefsson Date: Thu, 10 Nov 2011 11:31:00 +0000 (+0100) Subject: Make more functions available internally (for OCSP). X-Git-Tag: gnutls_3_0_8~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6402455d8a63ecc5822504adb0ee9c5741ff8a4c;p=thirdparty%2Fgnutls.git Make more functions available internally (for OCSP). --- diff --git a/lib/x509/common.c b/lib/x509/common.c index cfbcdff3a6..69db11db70 100644 --- a/lib/x509/common.c +++ b/lib/x509/common.c @@ -1,6 +1,5 @@ /* - * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free - * Software Foundation, Inc. + * Copyright (C) 2003-2011 Free Software Foundation, Inc. * * Author: Nikos Mavrogiannopoulos * @@ -599,7 +598,7 @@ _gnutls_x509_gtime2utcTime (time_t gtime, char *str_time, int str_time_size) * The given time is expressed as: * YEAR(4)|MONTH(2)|DAY(2)|HOUR(2)|MIN(2)|SEC(2)* */ -static time_t +time_t _gnutls_x509_generalTime2gtime (const char *ttime) { char xx[5]; diff --git a/lib/x509/common.h b/lib/x509/common.h index d6cafdabdd..1d6caaf23d 100644 --- a/lib/x509/common.h +++ b/lib/x509/common.h @@ -156,4 +156,14 @@ void _asnstr_append_name (char *name, size_t name_size, const char *part1, int check_if_same_cert (gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2); +time_t _gnutls_x509_generalTime2gtime (const char *ttime); + +int get_extension (ASN1_TYPE asn, const char *root, + const char *extension_id, int indx, + gnutls_datum_t * ret, unsigned int *_critical); + +int set_extension (ASN1_TYPE asn, const char *root, + const char *ext_id, + const gnutls_datum_t * ext_data, unsigned int critical); + #endif diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index 025c38c846..4e73fd945b 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -1,6 +1,5 @@ /* - * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software - * Foundation, Inc. + * Copyright (C) 2003-2011 Free Software Foundation, Inc. * * Author: Nikos Mavrogiannopoulos * @@ -32,7 +31,7 @@ #include #include -static int +int get_extension (ASN1_TYPE asn, const char *root, const char *extension_id, int indx, gnutls_datum_t * ret, unsigned int *_critical) @@ -408,7 +407,7 @@ overwrite_extension (ASN1_TYPE asn, const char *root, unsigned int indx, return 0; } -static int +int set_extension (ASN1_TYPE asn, const char *root, const char *ext_id, const gnutls_datum_t * ext_data, unsigned int critical)