summaryrefslogtreecommitdiff
path: root/lib/gnutls_cipher_int.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-03-23 12:16:54 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-03-23 12:16:54 +0000
commit1eff1dd92bb79997fb81a8dc53da7c73c4308e98 (patch)
tree3b708d93687bf7b9c694c2970df25e348c624883 /lib/gnutls_cipher_int.c
parent50e430c625cd065dbc488ccd698fb8d7c9ac7bc4 (diff)
downloadgnutls-1eff1dd92bb79997fb81a8dc53da7c73c4308e98.tar.gz
* Added support for encoding and decoding PKCS #8 2.0 encrypted
RSA private keys.
Diffstat (limited to 'lib/gnutls_cipher_int.c')
-rw-r--r--lib/gnutls_cipher_int.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gnutls_cipher_int.c b/lib/gnutls_cipher_int.c
index 7ca96386a2..2f7badadd3 100644
--- a/lib/gnutls_cipher_int.c
+++ b/lib/gnutls_cipher_int.c
@@ -24,7 +24,8 @@
#include <gnutls_cipher_int.h>
#include <gnutls_datum.h>
-GNUTLS_CIPHER_HANDLE _gnutls_cipher_init( gnutls_cipher_algorithm cipher, gnutls_datum key, gnutls_datum iv)
+GNUTLS_CIPHER_HANDLE _gnutls_cipher_init( gnutls_cipher_algorithm cipher,
+ const gnutls_datum *key, const gnutls_datum *iv)
{
GNUTLS_CIPHER_HANDLE ret;
@@ -52,8 +53,8 @@ GNUTLS_CIPHER_HANDLE ret;
ret = GNUTLS_CIPHER_FAILED;
}
if (ret!=GNUTLS_CIPHER_FAILED) {
- gcry_cipher_setkey(ret, key.data, key.size);
- if (iv.data!=NULL && iv.size>0) gcry_cipher_setiv(ret, iv.data, iv.size);
+ gcry_cipher_setkey(ret, key->data, key->size);
+ if (iv->data!=NULL && iv->size>0) gcry_cipher_setiv(ret, iv->data, iv->size);
}
return ret;