]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_x509_privkey_import_openssl() works only with PEM files. gnutls_3_0_21
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 2 Jul 2012 17:50:03 +0000 (19:50 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 2 Jul 2012 17:50:03 +0000 (19:50 +0200)
lib/includes/gnutls/x509.h
lib/x509/privkey.c
lib/x509/privkey_openssl.c

index a1947ffcb07a43806e63103621b746a317053043..5923aca72a825144548865ddbbea695c97620408 100644 (file)
@@ -719,7 +719,7 @@ extern "C"
                                         const char *password,
                                         unsigned int flags);
   int gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key,
-                                          const gnutls_datum_t *data, gnutls_x509_crt_fmt_t format, 
+                                          const gnutls_datum_t *data, 
                                           const char* password);
 
   int gnutls_x509_privkey_import2 (gnutls_x509_privkey_t key,
index 8c68ef22845da16e2c529f2159e5ee974098d3a4..26e1332748180c233f5650329a2b7a8acbb7d581 100644 (file)
@@ -608,7 +608,7 @@ gnutls_x509_privkey_import2 (gnutls_x509_privkey_t key,
           if (format == GNUTLS_X509_FMT_PEM)
             {
               int err;
-              err = gnutls_x509_privkey_import_openssl(key, data, format, password);
+              err = gnutls_x509_privkey_import_openssl(key, data, password);
               if (err < 0)
                 {
                   if (err == GNUTLS_E_DECRYPTION_FAILED) ret = err;
index 63a930e7e7b9e2479325805c2591b280a1e0c069..6ef1410caac2e51f5cbd43a8b268f17f8e7c64b3 100644 (file)
@@ -105,7 +105,6 @@ static const struct pem_cipher {
  * gnutls_x509_privkey_import_openssl:
  * @key: The structure to store the parsed key
  * @data: The DER or PEM encoded key.
- * @format: Only PEM is supported
  * @password: the password to decrypt the key (if it is encrypted).
  *
  * This function will convert the given PEM encrypted to 
@@ -122,7 +121,7 @@ static const struct pem_cipher {
  **/
 int
 gnutls_x509_privkey_import_openssl (gnutls_x509_privkey_t key,
-                                    const gnutls_datum_t *data, gnutls_x509_crt_fmt_t format, const char* password)
+                                    const gnutls_datum_t *data, const char* password)
 {
   gnutls_cipher_hd_t handle;
   gnutls_cipher_algorithm_t cipher = GNUTLS_CIPHER_UNKNOWN;