diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/x509/Makefile.am | 8 | ||||
-rw-r--r-- | lib/x509/compat.c | 96 | ||||
-rw-r--r-- | lib/x509/compat.h | 26 |
3 files changed, 4 insertions, 126 deletions
diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am index e8b3866d78..8d44678802 100644 --- a/lib/x509/Makefile.am +++ b/lib/x509/Makefile.am @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -# Copyright (C) 2003, 2004, 2005 Free Software Foundation +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation # # This file is part of GNUTLS. # @@ -29,9 +29,9 @@ noinst_LTLIBRARIES = libgnutls_x509.la libgnutls_x509_la_SOURCES = crl.c dn.c common.c x509.c extensions.c \ dsa.c rfc2818_hostname.c verify.c mpi.c privkey.c pkcs7.c \ crq.c xml.c sign.c privkey_pkcs8.c pkcs12.c pkcs12_bag.c \ - pkcs12_encr.c x509_write.c crl_write.c compat.c dn.h common.h \ - x509.h extensions.h pkcs7.h compat.h verify.h mpi.h crq.h \ - sign.h privkey.h pkcs12.h rfc2818.h dsa.h + pkcs12_encr.c x509_write.c crl_write.c dn.h common.h x509.h \ + extensions.h pkcs7.h verify.h mpi.h crq.h sign.h privkey.h \ + pkcs12.h rfc2818.h dsa.h EXTRA_DIST = x509-api.texi diff --git a/lib/x509/compat.c b/lib/x509/compat.c deleted file mode 100644 index f3e5a50a4c..0000000000 --- a/lib/x509/compat.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation - * - * Author: Nikos Mavroyanopoulos - * - * This file is part of GNUTLS. - * - * The GNUTLS library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA - * - */ - -/* This file includes all functions that were in the 0.5.x and 0.8.x - * gnutls API. They are now implemented over the new certificate parsing - * API. - */ - -#include <gnutls/x509.h> - -/*- - * _gnutls_x509_extract_certificate_activation_time - This function returns the peer's certificate activation time - * @cert: should contain an X.509 DER encoded certificate - * - * This function will return the certificate's activation time in UNIX time - * (ie seconds since 00:00:00 UTC January 1, 1970). - * Returns a (time_t) -1 in case of an error. - * - -*/ -time_t -_gnutls_x509_get_raw_crt_activation_time (const gnutls_datum_t * cert) -{ - gnutls_x509_crt_t xcert; - time_t result; - - result = gnutls_x509_crt_init (&xcert); - if (result < 0) - return result; - - result = gnutls_x509_crt_import (xcert, cert, GNUTLS_X509_FMT_DER); - if (result < 0) - { - gnutls_x509_crt_deinit (xcert); - return result; - } - - result = gnutls_x509_crt_get_activation_time (xcert); - - gnutls_x509_crt_deinit (xcert); - - return result; -} - -/*- - * gnutls_x509_extract_certificate_expiration_time - This function returns the certificate's expiration time - * @cert: should contain an X.509 DER encoded certificate - * - * This function will return the certificate's expiration time in UNIX time - * (ie seconds since 00:00:00 UTC January 1, 1970). - * Returns a (time_t) -1 in case of an error. - * - -*/ -time_t -_gnutls_x509_get_raw_crt_expiration_time (const gnutls_datum_t * cert) -{ - gnutls_x509_crt_t xcert; - time_t result; - - result = gnutls_x509_crt_init (&xcert); - if (result < 0) - return result; - - result = gnutls_x509_crt_import (xcert, cert, GNUTLS_X509_FMT_DER); - if (result < 0) - { - gnutls_x509_crt_deinit (xcert); - return result; - } - - result = gnutls_x509_crt_get_expiration_time (xcert); - - gnutls_x509_crt_deinit (xcert); - - return result; -} diff --git a/lib/x509/compat.h b/lib/x509/compat.h deleted file mode 100644 index d5e8fdde43..0000000000 --- a/lib/x509/compat.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2003, 2004, 2005 Free Software Foundation - * - * Author: Nikos Mavroyanopoulos - * - * This file is part of GNUTLS. - * - * The GNUTLS library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - * USA - * - */ - -time_t _gnutls_x509_get_raw_crt_activation_time (const gnutls_datum_t *); -time_t _gnutls_x509_get_raw_crt_expiration_time (const gnutls_datum_t *); |