[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-60-g8f84ab9
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-60-g8f84ab9 |
Date: |
Sat, 15 Jan 2011 19:57:55 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=8f84ab9807a41049a2cd993f03bef41119c0834c
The branch, master has been updated
via 8f84ab9807a41049a2cd993f03bef41119c0834c (commit)
via 4b6f8f1d86459e38b2c29ce7df38f52ac136ad45 (commit)
via 0a3285078d1a04311e9afb4b81e9efe5930a4416 (commit)
via b0768f2ce5673781b2c3815833bca9aefc5bc93b (commit)
from 7e2cbf896881816df86fcfef0ad10a45e60741b3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8f84ab9807a41049a2cd993f03bef41119c0834c
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jan 15 20:57:43 2011 +0100
updated Makefile.in
commit 4b6f8f1d86459e38b2c29ce7df38f52ac136ad45
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jan 15 20:43:10 2011 +0100
fixes in internal build with the new deprecated functions. We allow them to
be used since they are inter-dependent.
commit 0a3285078d1a04311e9afb4b81e9efe5930a4416
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jan 15 20:30:25 2011 +0100
replaced old gnutls_pk_algorithm.
commit b0768f2ce5673781b2c3815833bca9aefc5bc93b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jan 15 20:08:25 2011 +0100
depends on gnutls/x509.h to compile.
-----------------------------------------------------------------------
Summary of changes:
doc/examples/ex-crq.c | 6 +++++-
lib/configure.ac | 2 +-
lib/includes/gnutls/compat.h | 3 +++
lib/includes/gnutls/gnutls.h.in | 3 +++
lib/includes/gnutls/x509.h | 2 --
lib/x509/x509_int.h | 2 +-
src/certtool.c | 26 +++++++++++++++++++++++---
tests/crq_key_id.c | 17 ++++++++++++++++-
tests/suite/Makefile.in | 8 +++++++-
9 files changed, 59 insertions(+), 10 deletions(-)
diff --git a/doc/examples/ex-crq.c b/doc/examples/ex-crq.c
index c8961d8..4b5f337 100644
--- a/doc/examples/ex-crq.c
+++ b/doc/examples/ex-crq.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
+#include <gnutls/abstract.h>
#include <time.h>
/* This example will generate a private key and a certificate
@@ -20,6 +21,7 @@ main (void)
{
gnutls_x509_crq_t crq;
gnutls_x509_privkey_t key;
+ gnutls_privkey_t pkey; /* object used for signing */
unsigned char buffer[10 * 1024];
size_t buffer_size = sizeof (buffer);
unsigned int bits;
@@ -32,6 +34,7 @@ main (void)
gnutls_x509_crq_init (&crq);
gnutls_x509_privkey_init (&key);
+ gnutls_privkey_init (&pkey);
/* Generate an RSA key of moderate security.
*/
@@ -60,7 +63,8 @@ main (void)
/* Self sign the certificate request.
*/
- gnutls_x509_crq_sign (crq, key);
+ gnutls_privkey_import_x509( pkey, key, 0);
+ gnutls_x509_crq_privkey_sign (crq, pkey, GNUTLS_DIG_SHA1, 0);
/* Export the PEM encoded certificate request, and
* display it.
diff --git a/lib/configure.ac b/lib/configure.ac
index aca2e44..f6793bb 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -97,7 +97,7 @@ AC_SUBST([WARN_CFLAGS])
AC_PROG_CXX
AM_CONDITIONAL(ENABLE_CXX, test "$use_cxx" != "no")
-AC_DEFINE([GNUTLS_COMPAT_H], 1, [Make sure we don't use old features in code.])
+AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of
deprecated functions - until they are removed.])
AC_CONFIG_FILES([
Makefile
diff --git a/lib/includes/gnutls/compat.h b/lib/includes/gnutls/compat.h
index 30b2094..51d304c 100644
--- a/lib/includes/gnutls/compat.h
+++ b/lib/includes/gnutls/compat.h
@@ -7,9 +7,11 @@
#define _GNUTLS_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 +
__GNUC_PATCHLEVEL__)
+#if !defined(GNUTLS_INTERNAL_BUILD)
#if _GNUTLS_GCC_VERSION >= 30100
#define _GNUTLS_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
#endif
+#endif
#endif /* __GNUC__ */
@@ -287,6 +289,7 @@ gnutls_sign_callback_get (gnutls_session_t session, void
**userdata)
_GNUTLS_GCC_ATTR_DEPRECATED;
+
/* gnutls_x509_crl_privkey_sign */
int gnutls_x509_crl_sign (gnutls_x509_crl_t crl,
gnutls_x509_crt_t issuer,
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index b7725b9..fe9909a 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1090,6 +1090,9 @@ extern "C"
struct gnutls_x509_crt_int;
typedef struct gnutls_x509_crt_int *gnutls_x509_crt_t;
+ struct gnutls_x509_crq_int;
+ typedef struct gnutls_x509_crq_int *gnutls_x509_crq_t;
+
struct gnutls_openpgp_keyring_int;
typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring_t;
diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h
index 9b42dcd..ffc0c50 100644
--- a/lib/includes/gnutls/x509.h
+++ b/lib/includes/gnutls/x509.h
@@ -698,8 +698,6 @@ extern "C"
/* Certificate request stuff.
*/
- struct gnutls_x509_crq_int;
- typedef struct gnutls_x509_crq_int *gnutls_x509_crq_t;
int gnutls_x509_crq_print (gnutls_x509_crq_t crq,
gnutls_certificate_print_formats_t format,
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index f444280..61d2245 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -189,7 +189,7 @@ int gnutls_x509_crt_is_issuer (gnutls_x509_crt_t cert,
int
_gnutls_x509_verify_algorithm (gnutls_mac_algorithm_t * hash,
const gnutls_datum_t * signature,
- gnutls_pk_algorithm pk,
+ gnutls_pk_algorithm_t pk,
bigint_t * issuer_params,
unsigned int issuer_params_size);
diff --git a/src/certtool.c b/src/certtool.c
index 826b05c..c99ccf0 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -923,6 +923,7 @@ generate_signed_crl (common_info_st * cinfo)
gnutls_x509_crl_t crl;
int result;
gnutls_x509_privkey_t ca_key;
+ gnutls_privkey_t ca_pkey;
gnutls_x509_crt_t ca_crt;
fprintf (stderr, "Generating a signed CRL...\n");
@@ -931,14 +932,23 @@ generate_signed_crl (common_info_st * cinfo)
ca_crt = load_ca_cert (cinfo);
crl = generate_crl (ca_crt, cinfo);
+ result = gnutls_privkey_init(&ca_pkey);
+ if (result < 0)
+ error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (result));
+
+ result = gnutls_privkey_import_x509(ca_pkey, ca_key, 0);
+ if (result < 0)
+ error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (result));
+
fprintf (stderr, "\n");
- result = gnutls_x509_crl_sign (crl, ca_crt, ca_key);
+ result = gnutls_x509_crl_privkey_sign(crl, ca_crt, ca_pkey, GNUTLS_DIG_SHA1,
0);
if (result < 0)
- error (EXIT_FAILURE, 0, "crl_sign: %s", gnutls_strerror (result));
+ error (EXIT_FAILURE, 0, "crl_privkey_sign: %s", gnutls_strerror (result));
print_crl_info (crl, stderr);
+ gnutls_privkey_deinit( ca_pkey);
gnutls_x509_crl_deinit (crl);
}
@@ -1751,6 +1761,7 @@ generate_request (common_info_st * cinfo)
{
gnutls_x509_crq_t crq;
gnutls_x509_privkey_t key;
+ gnutls_privkey_t pkey;
int ret, ca_status, path_len;
const char *pass;
unsigned int usage = 0;
@@ -1761,6 +1772,10 @@ generate_request (common_info_st * cinfo)
if (ret < 0)
error (EXIT_FAILURE, 0, "crq_init: %s", gnutls_strerror (ret));
+ ret = gnutls_privkey_init (&pkey);
+ if (ret < 0)
+ error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (ret));
+
/* Load the private key.
*/
key = load_private_key (0, cinfo);
@@ -1771,6 +1786,10 @@ generate_request (common_info_st * cinfo)
print_private_key (key);
}
+ ret = gnutls_privkey_import_x509(pkey, key, 0);
+ if (ret < 0)
+ error (EXIT_FAILURE, 0, "privkey_import_x509: %s", gnutls_strerror (ret));
+
/* Set the DN.
*/
get_country_crq_set (crq);
@@ -1892,13 +1911,14 @@ generate_request (common_info_st * cinfo)
if (ret < 0)
error (EXIT_FAILURE, 0, "set_key: %s", gnutls_strerror (ret));
- ret = gnutls_x509_crq_sign (crq, key);
+ ret = gnutls_x509_crq_privkey_sign (crq, pkey, GNUTLS_DIG_SHA1, 0);
if (ret < 0)
error (EXIT_FAILURE, 0, "sign: %s", gnutls_strerror (ret));
print_crq_info (crq, outfile);
gnutls_x509_crq_deinit (crq);
+ gnutls_privkey_deinit( pkey);
gnutls_x509_privkey_deinit (key);
}
diff --git a/tests/crq_key_id.c b/tests/crq_key_id.c
index da2461c..2d7a9c4 100644
--- a/tests/crq_key_id.c
+++ b/tests/crq_key_id.c
@@ -30,6 +30,7 @@
#include <gcrypt.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
+#include <gnutls/abstract.h>
#include "utils.h"
@@ -43,6 +44,7 @@ void
doit (void)
{
gnutls_x509_privkey_t pkey;
+ gnutls_privkey_t abs_pkey;
gnutls_x509_crq_t crq;
size_t pkey_key_id_len;
@@ -75,6 +77,12 @@ doit (void)
fail ("gnutls_x509_privkey_init: %d\n", ret);
}
+ ret = gnutls_privkey_init (&abs_pkey);
+ if (ret < 0)
+ {
+ fail ("gnutls_privkey_init: %d\n", ret);
+ }
+
ret = gnutls_x509_privkey_generate (pkey, algorithm, 1024, 0);
if (ret < 0)
{
@@ -123,7 +131,13 @@ doit (void)
fail ("gnutls_x509_crq_set_dn_by_oid: %d\n", ret);
}
- ret = gnutls_x509_crq_sign (crq, pkey);
+ ret = gnutls_privkey_import_x509( abs_pkey, pkey, 0);
+ if (ret < 0)
+ {
+ fail ("gnutls_privkey_import_x509: %d\n", ret);
+ }
+
+ ret = gnutls_x509_crq_privkey_sign (crq, abs_pkey, GNUTLS_DIG_SHA1, 0);
if (ret)
{
fail ("gnutls_x509_crq_sign: %d\n", ret);
@@ -177,6 +191,7 @@ doit (void)
gnutls_x509_crq_deinit (crq);
gnutls_x509_privkey_deinit (pkey);
+ gnutls_privkey_deinit (abs_pkey);
}
gnutls_global_deinit ();
diff --git a/tests/suite/Makefile.in b/tests/suite/Makefile.in
index 42f7f57..4f75ae2 100644
--- a/tests/suite/Makefile.in
+++ b/tests/suite/Makefile.in
@@ -415,6 +415,7 @@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
@@ -480,6 +481,7 @@ HAVE_DECL_FREEADDRINFO = @HAVE_DECL_FREEADDRINFO@
HAVE_DECL_GAI_STRERROR = @HAVE_DECL_GAI_STRERROR@
HAVE_DECL_GETADDRINFO = @HAVE_DECL_GETADDRINFO@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
@@ -493,6 +495,7 @@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
@@ -508,13 +511,13 @@ HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTELLO = @HAVE_FTELLO@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_FUTIMENS = @HAVE_FUTIMENS@
-HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
@@ -589,6 +592,7 @@ HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_ADDRINFO = @HAVE_STRUCT_ADDRINFO@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
+HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY =
@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
@@ -752,6 +756,7 @@ REPLACE_FTELLO = @REPLACE_FTELLO@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
@@ -804,6 +809,7 @@ REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_11_6-60-g8f84ab9,
Nikos Mavrogiannopoulos <=