diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-30 10:24:49 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-10-30 10:24:49 +0000 |
commit | 2488525753f09fa3a2d0a9a66ec6b783dea8a410 (patch) | |
tree | a04e9561de30a47d1cf5dae5e55a0532a9357477 | |
parent | c6bcb0ff23ca55aad863e2ad0e16979ed613fdc0 (diff) | |
download | gnutls-2488525753f09fa3a2d0a9a66ec6b783dea8a410.tar.gz |
Certtool is only compiled when ENABLE_PKI is defined.
-rw-r--r-- | src/certtool.c | 50 | ||||
-rw-r--r-- | src/crypt.c | 2 |
2 files changed, 44 insertions, 8 deletions
diff --git a/src/certtool.c b/src/certtool.c index 9f07c68152..1becf34e1c 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -1,7 +1,31 @@ +/* + * Copyright (C) 2003 Nikos Mavroyanopoulos + * + * This file is part of GNUTLS. + * + * GNUTLS is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNUTLS 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +#include <config.h> +#include <gnutls/gnutls.h> + +#ifdef ENABLE_PKI + #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <gnutls/gnutls.h> #include <gnutls/x509.h> #include <time.h> #include "certtool-gaa.h" @@ -530,12 +554,6 @@ void gaa_parser(int argc, char **argv) fclose(outfile); } -void certtool_version(void) -{ - fprintf(stderr, "certtool, "); - fprintf(stderr, "version %s. Libgnutls %s.\n", LIBGNUTLS_VERSION, - gnutls_check_version(NULL)); -} const char* get_algorithm( int a) { @@ -1583,3 +1601,21 @@ void pkcs12_info( void) } +#else /* ENABLE_PKI */ + +#include <stdio.h> + +int main (int argc, char **argv) +{ + printf ("\nX.509 PKI not supported. This program is a dummy.\n\n"); + return 1; +}; + +#endif + +void certtool_version(void) +{ + fprintf(stderr, "certtool, "); + fprintf(stderr, "version %s. Libgnutls %s.\n", LIBGNUTLS_VERSION, + gnutls_check_version(NULL)); +} diff --git a/src/crypt.c b/src/crypt.c index 90e4a67870..40c665a867 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001 Nikos Mavroyanopoulos + * Copyright (C) 2001,2003 Nikos Mavroyanopoulos * * This file is part of GNUTLS. * |