diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-01-15 20:43:10 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-01-15 20:57:18 +0100 |
commit | 4b6f8f1d86459e38b2c29ce7df38f52ac136ad45 (patch) | |
tree | de01eb1c9cede4db8aa328598a417a4bfed40f49 /doc | |
parent | 0a3285078d1a04311e9afb4b81e9efe5930a4416 (diff) | |
download | gnutls-4b6f8f1d86459e38b2c29ce7df38f52ac136ad45.tar.gz |
fixes in internal build with the new deprecated functions. We allow them to be used since they are inter-dependent.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/ex-crq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/examples/ex-crq.c b/doc/examples/ex-crq.c index c8961d8799..4b5f337d13 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. |