Browse Source

rsa_import_pkcs8 - passwd is now "const void *"

Karel Miko 8 years ago
parent
commit
52a496e9e1
2 changed files with 7 additions and 5 deletions
  1. 1 1
      src/headers/tomcrypt_pk.h
  2. 6 4
      src/pk/rsa/rsa_import_pkcs8.c

+ 1 - 1
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
 

+ 6 - 4
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;