fixed 3DES encryption

This commit is contained in:
Martin Willi
2008-05-07 11:54:30 +00:00
parent 5302703407
commit 4ce78f9356
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -303,7 +303,12 @@ err_t pem_to_bin(chunk_t *blob, chunk_t *passphrase, bool *pgp)
if (state != PEM_POST)
return "file coded in unknown format, discarded";
return (encrypted)? pem_decrypt(blob, alg, key_size, &iv, passphrase) : NULL;
if (!encrypted)
{
return NULL;
}
return pem_decrypt(blob, alg, key_size, &iv, passphrase);
}
/* load a coded key or certificate file with autodetection