diff --git a/src/headers/tomcrypt_pk.h b/src/headers/tomcrypt_pk.h index 967b7bf..2c9f759 100644 --- a/src/headers/tomcrypt_pk.h +++ b/src/headers/tomcrypt_pk.h @@ -109,7 +109,7 @@ int rsa_import(const unsigned char *in, unsigned long inlen, rsa_key *key); int rsa_import_x509(const unsigned char *in, unsigned long inlen, rsa_key *key); int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen, - const unsigned char *passwd, unsigned long passwdlen, rsa_key *key); + const void *passwd, unsigned long passwdlen, rsa_key *key); int rsa_import_radix(int radix, char *N, char *e, char *d, char *p, char *q, char *dP, char *dQ, char *qP, rsa_key *key); #endif diff --git a/src/pk/rsa/rsa_import_pkcs8.c b/src/pk/rsa/rsa_import_pkcs8.c index 2221497..2f2aa36 100755 --- a/src/pk/rsa/rsa_import_pkcs8.c +++ b/src/pk/rsa/rsa_import_pkcs8.c @@ -42,13 +42,15 @@ /** Import an RSAPublicKey or RSAPrivateKey in PKCS#8 format - @param in The packet to import from - @param inlen It's length (octets) - @param key [out] Destination for newly imported key + @param in The packet to import from + @param inlen It's length (octets) + @param passwd The password for decrypting privkey (NOT SUPPORTED YET) + @param passwdlen Password's length (octets) + @param key [out] Destination for newly imported key @return CRYPT_OK if successful, upon error allocated memory is freed */ int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen, - const unsigned char *passwd, unsigned long passwdlen, + const void *passwd, unsigned long passwdlen, rsa_key *key) { int err;