diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-05-31 16:52:13 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-03 19:55:02 +0200 |
commit | 24a416ea2014cf26cf0d0082a456184d33b49cc1 (patch) | |
tree | bd3fce3bb3b47748ae5e18a14eed871fdd0c785b /doc | |
parent | 5eeabed81dbfe7a2e4089e612db5c61e60edeb91 (diff) | |
download | gnutls-24a416ea2014cf26cf0d0082a456184d33b49cc1.tar.gz |
Added gnutls_x509_crq_get_preferred_hash_algorithm().
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/ex-crq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/ex-crq.c b/doc/examples/ex-crq.c index 9d40e90772..f36aece99a 100644 --- a/doc/examples/ex-crq.c +++ b/doc/examples/ex-crq.c @@ -22,6 +22,7 @@ main (void) gnutls_x509_privkey_t key; unsigned char buffer[10 * 1024]; size_t buffer_size = sizeof (buffer); + unsigned int bits; gnutls_global_init (); @@ -32,9 +33,10 @@ main (void) gnutls_x509_privkey_init (&key); - /* Generate a 1024 bit RSA private key. + /* Generate an RSA key of moderate security. */ - gnutls_x509_privkey_generate (key, GNUTLS_PK_RSA, 1024, 0); + bits = gnutls_sec_param_to_pk_bits( GNUTLS_PK_RSA, GNUTLS_SEC_PARAM_NORMAL); + gnutls_x509_privkey_generate (key, GNUTLS_PK_RSA, bits, 0); /* Add stuff to the distinguished name */ |