diff options
-rw-r--r-- | doc/reference/Makefile.am | 2 | ||||
-rw-r--r-- | lib/gnutls_cert.c | 1 | ||||
-rw-r--r-- | lib/gnutls_dh_primes.c | 4 | ||||
-rw-r--r-- | lib/gnutls_pk.c | 4 | ||||
-rw-r--r-- | lib/gnutls_x509.c | 1 | ||||
-rw-r--r-- | lib/x509/Makefile.am | 2 | ||||
-rw-r--r-- | lib/x509/common.c | 4 | ||||
-rw-r--r-- | lib/x509/crl_write.c | 1 | ||||
-rw-r--r-- | lib/x509/crq.c | 3 | ||||
-rw-r--r-- | lib/x509/extensions.c | 1 | ||||
-rw-r--r-- | lib/x509/mpi.c | 1 | ||||
-rw-r--r-- | lib/x509/mpi.h | 57 | ||||
-rw-r--r-- | lib/x509/pkcs12.c | 2 | ||||
-rw-r--r-- | lib/x509/privkey.c | 1 | ||||
-rw-r--r-- | lib/x509/privkey_pkcs8.c | 3 | ||||
-rw-r--r-- | lib/x509/sign.c | 1 | ||||
-rw-r--r-- | lib/x509/verify.c | 3 | ||||
-rw-r--r-- | lib/x509/x509.c | 1 | ||||
-rw-r--r-- | lib/x509/x509_int.h | 32 | ||||
-rw-r--r-- | lib/x509/x509_write.c | 3 |
20 files changed, 45 insertions, 82 deletions
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index 903ddff98e..1385dd6429 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 compat.h \ + common.h compat.h \ \ gnutls_extra.h openssl_compat.h \ \ diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index 1f24ae100e..989719fc38 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -41,7 +41,6 @@ #include <gnutls_auth_int.h> #include <gnutls_x509.h> #include "x509/x509_int.h" -#include "x509/mpi.h" #ifdef ENABLE_OPENPGP # include "openpgp/gnutls_openpgp.h" #endif diff --git a/lib/gnutls_dh_primes.c b/lib/gnutls_dh_primes.c index 7a40db3d79..1e68195cbc 100644 --- a/lib/gnutls_dh_primes.c +++ b/lib/gnutls_dh_primes.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation + * Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008 Free Software Foundation * * Author: Nikos Mavrogiannopoulos * @@ -28,7 +28,7 @@ #include <x509_b64.h> /* for PKCS3 PEM decoding */ #include <gnutls_global.h> #include <gnutls_dh.h> -#include <x509/mpi.h> +#include "x509/x509_int.h" #include "debug.h" diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c index 389f40fcf1..3427083beb 100644 --- a/lib/gnutls_pk.c +++ b/lib/gnutls_pk.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation + * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation * * Author: Nikos Mavrogiannopoulos * @@ -34,7 +34,7 @@ #include <gnutls_global.h> #include <gnutls_num.h> #include "debug.h" -#include <x509/mpi.h> +#include <x509/x509_int.h> #include <x509/common.h> #include <gc.h> diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index ef6c15eeb6..e6adbde4d0 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -44,7 +44,6 @@ #include <gnutls_x509.h> #include "x509/common.h" #include "x509/x509_int.h" -#include "x509/mpi.h" #include "read-file.h" /* diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am index b8ee0080b6..28fbee5748 100644 --- a/lib/x509/Makefile.am +++ b/lib/x509/Makefile.am @@ -32,7 +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 \ - mpi.h pkcs12.h output.c + pkcs12.h output.c EXTRA_DIST = x509-api.texi diff --git a/lib/x509/common.c b/lib/x509/common.c index 0eeb0348cb..d7cf9eb641 100644 --- a/lib/x509/common.c +++ b/lib/x509/common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation + * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation * * Author: Nikos Mavrogiannopoulos * @@ -31,8 +31,8 @@ #include <gnutls_x509.h> #include <gnutls_num.h> #include <x509_b64.h> +#include "x509_int.h" #include <common.h> -#include <mpi.h> #include <time.h> typedef struct _oid2string diff --git a/lib/x509/crl_write.c b/lib/x509/crl_write.c index b4f7050c36..6834fc858c 100644 --- a/lib/x509/crl_write.c +++ b/lib/x509/crl_write.c @@ -36,7 +36,6 @@ #include <gnutls_x509.h> #include <x509_b64.h> #include <x509_int.h> -#include <mpi.h> #include <libtasn1.h> static void disable_optional_stuff (gnutls_x509_crl_t crl); diff --git a/lib/x509/crq.c b/lib/x509/crq.c index 5636c4479f..b06489959f 100644 --- a/lib/x509/crq.c +++ b/lib/x509/crq.c @@ -35,8 +35,7 @@ #include <common.h> #include <gnutls_x509.h> #include <x509_b64.h> -#include <x509_int.h> -#include <mpi.h> +#include "x509_int.h" #include <libtasn1.h> /** diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index dcc82798df..af3b0fc5f8 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -28,7 +28,6 @@ #include <gnutls_int.h> #include <gnutls_errors.h> #include <gnutls_global.h> -#include <mpi.h> #include <libtasn1.h> #include <common.h> #include <x509_int.h> diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c index d0fc52e32d..74334aa1e8 100644 --- a/lib/x509/mpi.c +++ b/lib/x509/mpi.c @@ -30,7 +30,6 @@ #include "common.h" #include "x509_int.h" #include <gnutls_num.h> -#include "mpi.h" /* * some x509 certificate parsing functions that relate to MPI parameter diff --git a/lib/x509/mpi.h b/lib/x509/mpi.h deleted file mode 100644 index c8bd72a643..0000000000 --- a/lib/x509/mpi.h +++ /dev/null @@ -1,57 +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 <gnutls_int.h> -#include "x509_int.h" - -int _gnutls_x509_crt_get_mpis (gnutls_x509_crt_t cert, - mpi_t * params, int *params_size); -int _gnutls_x509_read_rsa_params (opaque * der, int dersize, mpi_t * params); -int _gnutls_x509_read_dsa_pubkey (opaque * der, int dersize, mpi_t * params); -int _gnutls_x509_read_dsa_params (opaque * der, int dersize, mpi_t * params); - -int _gnutls_x509_write_rsa_params (mpi_t * params, int params_size, - gnutls_datum_t * der); -int _gnutls_x509_write_dsa_params (mpi_t * params, int params_size, - gnutls_datum_t * der); -int _gnutls_x509_write_dsa_public_key (mpi_t * params, int params_size, - gnutls_datum_t * der); - -int _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, - unsigned int *ret); - -int -_gnutls_x509_read_der_int (opaque * der, int dersize, mpi_t* out); - -int _gnutls_x509_read_int (ASN1_TYPE node, const char *value, - mpi_t * ret_mpi); -int _gnutls_x509_write_int (ASN1_TYPE node, const char *value, mpi_t mpi, - int lz); -int _gnutls_x509_write_uint32 (ASN1_TYPE node, const char *value, - uint32_t num); - -int _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char *dst_name, - gnutls_pk_algorithm_t pk_algorithm, - gnutls_digest_algorithm_t, mpi_t * params, - int params_size); diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c index b258373108..4601b285b2 100644 --- a/lib/x509/pkcs12.c +++ b/lib/x509/pkcs12.c @@ -36,8 +36,8 @@ #include <gnutls_num.h> #include <common.h> #include <x509_b64.h> +#include "x509_int.h" #include <pkcs12.h> -#include <mpi.h> #include <gc.h> diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c index a83ec0e91a..a52b7c7b84 100644 --- a/lib/x509/privkey.c +++ b/lib/x509/privkey.c @@ -32,7 +32,6 @@ #include <gnutls_x509.h> #include <x509_b64.h> #include <x509_int.h> -#include <mpi.h> 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/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index 17aca8b42d..04946bac8f 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -33,9 +33,8 @@ #include <common.h> #include <gnutls_x509.h> #include <x509_b64.h> -#include <x509_int.h> +#include "x509_int.h" #include <pkcs12.h> -#include <mpi.h> #include <gnutls_algorithms.h> #include <gnutls_num.h> #include <gc.h> diff --git a/lib/x509/sign.c b/lib/x509/sign.c index e807614c33..47fd6ed31a 100644 --- a/lib/x509/sign.c +++ b/lib/x509/sign.c @@ -39,7 +39,6 @@ #include <gnutls_str.h> #include <gnutls_datum.h> #include <x509_int.h> -#include <mpi.h> #include <common.h> /* Writes the digest information and the digest in a DER encoded diff --git a/lib/x509/verify.c b/lib/x509/verify.c index 6ae4cf7165..26abb56d25 100644 --- a/lib/x509/verify.c +++ b/lib/x509/verify.c @@ -35,8 +35,7 @@ #include <gnutls_sig.h> #include <gnutls_str.h> #include <gnutls_datum.h> -#include <x509_int.h> -#include <mpi.h> +#include "x509_int.h" #include <common.h> static int _gnutls_verify_certificate2 (gnutls_x509_crt_t cert, diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 2277253d3b..d9b17b7e54 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -33,7 +33,6 @@ #include <x509_b64.h> #include <x509_int.h> #include <libtasn1.h> -#include <mpi.h> /** * 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 0015ac35e4..550ec12b9c 100644 --- a/lib/x509/x509_int.h +++ b/lib/x509/x509_int.h @@ -223,4 +223,36 @@ int _gnutls_x509_ext_gen_proxyCertInfo (int pathLenConstraint, size_t sizeof_policy, gnutls_datum_t * der_ext); +/* mpi.c */ + +int _gnutls_x509_crt_get_mpis (gnutls_x509_crt_t cert, + mpi_t * params, int *params_size); +int _gnutls_x509_read_rsa_params (opaque * der, int dersize, mpi_t * params); +int _gnutls_x509_read_dsa_pubkey (opaque * der, int dersize, mpi_t * params); +int _gnutls_x509_read_dsa_params (opaque * der, int dersize, mpi_t * params); + +int _gnutls_x509_write_rsa_params (mpi_t * params, int params_size, + gnutls_datum_t * der); +int _gnutls_x509_write_dsa_params (mpi_t * params, int params_size, + gnutls_datum_t * der); +int _gnutls_x509_write_dsa_public_key (mpi_t * params, int params_size, + gnutls_datum_t * der); + +int _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, + unsigned int *ret); + +int _gnutls_x509_read_der_int (opaque * der, int dersize, mpi_t* out); + +int _gnutls_x509_read_int (ASN1_TYPE node, const char *value, + mpi_t * ret_mpi); +int _gnutls_x509_write_int (ASN1_TYPE node, const char *value, mpi_t mpi, + int lz); +int _gnutls_x509_write_uint32 (ASN1_TYPE node, const char *value, + uint32_t num); + +int _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char *dst_name, + gnutls_pk_algorithm_t pk_algorithm, + gnutls_digest_algorithm_t, mpi_t * params, + int params_size); + #endif diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c index 0bd7e2447b..b583e873cd 100644 --- a/lib/x509/x509_write.c +++ b/lib/x509/x509_write.c @@ -35,8 +35,7 @@ #include <common.h> #include <gnutls_x509.h> #include <x509_b64.h> -#include <x509_int.h> -#include <mpi.h> +#include "x509_int.h" #include <libtasn1.h> static void disable_optional_stuff (gnutls_x509_crt_t cert); |