From: Simon Josefsson Date: Tue, 26 Feb 2008 10:15:58 +0000 (+0100) Subject: Move verify.h stuff to x509_int.h. X-Git-Tag: gnutls_2_3_2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b34c12461ebc223fa7ab102297d0fea67ac6f42;p=thirdparty%2Fgnutls.git Move verify.h stuff to x509_int.h. --- diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index 86da59f1eb..2c90ac7735 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -68,7 +68,7 @@ IGNORE_HFILES=debug.h gnutls_compress.h defines.h gnutls_cipher.h \ der.h errors.h gstr.h parser_aux.h element.h \ errors_int.h int.h mem.h structure.h \ \ - common.h mpi.h rfc2818.h verify.h compat.h \ + common.h mpi.h rfc2818.h compat.h \ extensions.h privkey.h \ \ gnutls_extra.h openssl_compat.h \ diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index 9e8b123c5e..14525893a8 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -44,7 +44,6 @@ #include #include "x509/common.h" #include "x509/x509_int.h" -#include "x509/verify.h" #include "x509/mpi.h" #include "x509/privkey.h" #include "read-file.h" diff --git a/lib/openpgp/pgpverify.c b/lib/openpgp/pgpverify.c index d6c1179241..0fb9904922 100644 --- a/lib/openpgp/pgpverify.c +++ b/lib/openpgp/pgpverify.c @@ -27,7 +27,6 @@ #include #include #include -#include /* lib/x509/verify.h */ /** diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am index 9ea8851420..c993726ac7 100644 --- a/lib/x509/Makefile.am +++ b/lib/x509/Makefile.am @@ -32,8 +32,7 @@ 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 sign.c privkey_pkcs8.c pkcs12.c pkcs12_bag.c \ pkcs12_encr.c x509_write.c crl_write.c common.h x509_int.h \ - extensions.h verify.h mpi.h privkey.h pkcs12.h rfc2818.h \ - output.c + extensions.h mpi.h privkey.h pkcs12.h rfc2818.h output.c EXTRA_DIST = x509-api.texi diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c index 9f839a4c17..9f8331a173 100644 --- a/lib/x509/privkey.c +++ b/lib/x509/privkey.c @@ -34,7 +34,6 @@ #include #include #include -#include static int _gnutls_asn1_encode_rsa (ASN1_TYPE * c2, mpi_t * params); int _gnutls_asn1_encode_dsa (ASN1_TYPE * c2, mpi_t * params); diff --git a/lib/x509/sign.c b/lib/x509/sign.c index 36a0f03ac2..e807614c33 100644 --- a/lib/x509/sign.c +++ b/lib/x509/sign.c @@ -41,7 +41,6 @@ #include #include #include -#include /* Writes the digest information and the digest in a DER encoded * structure. The digest info is allocated and stored into the info structure. diff --git a/lib/x509/verify.c b/lib/x509/verify.c index 052b9a4dbc..6ae4cf7165 100644 --- a/lib/x509/verify.c +++ b/lib/x509/verify.c @@ -38,7 +38,6 @@ #include #include #include -#include static int _gnutls_verify_certificate2 (gnutls_x509_crt_t cert, const gnutls_x509_crt_t * trusted_cas, diff --git a/lib/x509/verify.h b/lib/x509/verify.h deleted file mode 100644 index 5bd9aa94f3..0000000000 --- a/lib/x509/verify.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2003, 2004, 2005, 2008 Free Software Foundation - * - * Author: Nikos Mavrogiannopoulos - * - * 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 - * - */ - -#include "x509_int.h" - -int gnutls_x509_crt_is_issuer (gnutls_x509_crt_t cert, - gnutls_x509_crt_t issuer); -int _gnutls_x509_verify_signature (const gnutls_datum_t * tbs, - const gnutls_datum_t * signature, - gnutls_x509_crt_t issuer); -int _gnutls_x509_privkey_verify_signature (const gnutls_datum_t * tbs, - const gnutls_datum_t * signature, - gnutls_x509_privkey_t issuer); diff --git a/lib/x509/x509.c b/lib/x509/x509.c index e591b00c88..b11ebb8e0d 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -36,7 +36,6 @@ #include #include #include -#include /** * gnutls_x509_crt_init - This function initializes a gnutls_x509_crt_t structure diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h index 2e40c68c4a..3e9d568042 100644 --- a/lib/x509/x509_int.h +++ b/lib/x509/x509_int.h @@ -163,4 +163,15 @@ int _gnutls_x509_get_dn_oid (ASN1_TYPE asn1_struct, /* dsa.c */ int _gnutls_dsa_generate_params (mpi_t * resarr, int *resarr_len, int bits); + +/* verify.c */ +int gnutls_x509_crt_is_issuer (gnutls_x509_crt_t cert, + gnutls_x509_crt_t issuer); +int _gnutls_x509_verify_signature (const gnutls_datum_t * tbs, + const gnutls_datum_t * signature, + gnutls_x509_crt_t issuer); +int _gnutls_x509_privkey_verify_signature (const gnutls_datum_t * tbs, + const gnutls_datum_t * signature, + gnutls_x509_privkey_t issuer); + #endif