diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-08-13 15:45:16 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-08-13 15:45:16 +0000 |
commit | 8db01579c2c00f7ac4070f1e61d828eb50e43d8b (patch) | |
tree | 9d943c028d6e012a41bac95d357ba823d8d25ba6 | |
parent | 51d1c5831846b04475f6dfef0eeddfb11f6acce2 (diff) | |
download | gnutls-8db01579c2c00f7ac4070f1e61d828eb50e43d8b.tar.gz |
RC2 is not included when PKCS#12 is disabled.
-rw-r--r-- | lib/Makefile.am | 6 | ||||
-rw-r--r-- | lib/gnutls_global.c | 2 | ||||
-rw-r--r-- | lib/x509/Makefile.am | 4 | ||||
-rw-r--r-- | lib/x509/rc2.c (renamed from lib/rc2.c) | 21 | ||||
-rw-r--r-- | lib/x509/rc2.h (renamed from lib/rc2.h) | 0 |
5 files changed, 27 insertions, 6 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index b2c776c227..2c806b9ff7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -17,7 +17,7 @@ EXTRA_DIST = debug.h gnutls_compress.h defines.h gnutls.asn pkix.asn \ libgnutls-config.in libgnutls.m4 gnutls.h.in.in gnutls_errors_int.h \ gnutls-api.tex gnutls_datum.h auth_cert.h gnutls_mpi.h \ gnutls_pk.h gnutls_record.h gnutls_cert.h \ - gnutls_constate.h gnutls_global.h rc2.h \ + gnutls_constate.h gnutls_global.h \ gnutls_sig.h gnutls_mem.h gnutls_ui.h \ io_debug.h ext_max_record.h gnutls_session_pack.h \ gnutls_alert.h gnutls_str.h gnutls_state.h gnutls_x509.h \ @@ -40,7 +40,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c \ gnutls_str.c gnutls_state.c gnutls_x509.c ext_cert_type.c \ gnutls_rsa_export.c auth_rsa_export.c \ ext_server_name.c auth_dh_common.c \ - dh_compat.c rsa_compat.c strnstr.c rc2.c + dh_compat.c rsa_compat.c strnstr.c # Separate so we can create the documentation @@ -50,7 +50,7 @@ libgnutls_la_LIBADD = $(MINITASN1_OBJECTS) x509/dn.lo x509/crl.lo x509/common.lo x509/x509.lo x509/extensions.lo x509/compat.lo x509/verify.lo \ x509/mpi.lo x509/privkey.lo x509/pkcs7.lo x509/crq.lo x509/xml.lo x509/sign.lo \ x509/pkcs5.lo x509/privkey_pkcs8.lo x509/pkcs12.lo x509/pkcs12_bag.lo \ - x509/pkcs12_encr.lo x509/rfc2818_hostname.lo + x509/pkcs12_encr.lo x509/rfc2818_hostname.lo x509/rc2.lo libgnutls_la_LDFLAGS = $(LIBASN1_LINK) $(LIBGCRYPT_LIBS) \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 201b40179a..d4ed9abde6 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -23,7 +23,7 @@ #include <gnutls_errors.h> #include <libtasn1.h> #include <gnutls_dh.h> -#include "rc2.h" +#include "x509/rc2.h" typedef void (*LOG_FUNC)( int, const char*); #define gnutls_log_func LOG_FUNC diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am index 8e3696db04..abc53f3c1b 100644 --- a/lib/x509/Makefile.am +++ b/lib/x509/Makefile.am @@ -1,7 +1,7 @@ INCLUDES = -I../ -I../minitasn1/ -I../../includes/ EXTRA_DIST = dn.h common.h x509.h extensions.h pkcs7.h \ x509-api.tex compat.h verify.h mpi.h crq.h sign.h pkcs5.h \ - privkey.h pkcs12.h + privkey.h pkcs12.h rc2.h noinst_LTLIBRARIES = libx509.la #lib_LTLIBRARIES = libgnutls-x509.la @@ -9,7 +9,7 @@ noinst_LTLIBRARIES = libx509.la COBJECTS = crl.c dn.c common.c x509.c extensions.c \ rfc2818_hostname.c verify.c mpi.c privkey.c pkcs7.c \ crq.c xml.c sign.c pkcs5.c privkey_pkcs8.c pkcs12.c \ - pkcs12_bag.c pkcs12_encr.c + pkcs12_bag.c pkcs12_encr.c rc2.c COMPAT_OBJECTS = compat.c diff --git a/lib/rc2.c b/lib/x509/rc2.c index 64d45931ee..b993d44793 100644 --- a/lib/rc2.c +++ b/lib/x509/rc2.c @@ -26,6 +26,13 @@ */ #include <gnutls_int.h> + +#ifdef ENABLE_PKI + +/* RC2-40 is only used in PKCS #12 stuff, so do not include it + * if this is not enabled. + */ + #include <gnutls_errors.h> #include <gcrypt.h> @@ -364,3 +371,17 @@ void _gnutls_unregister_rc2_cipher(void) { gcry_cipher_unregister(rc2_40_mod); } + +#else /* ENABLE_PKI */ + +/* dummy functions. + */ + +int _gnutls_register_rc2_cipher(void) +{ return 0; } + +void _gnutls_unregister_rc2_cipher(void) +{ +} + +#endif diff --git a/lib/rc2.h b/lib/x509/rc2.h index 97fd5b0887..97fd5b0887 100644 --- a/lib/rc2.h +++ b/lib/x509/rc2.h |