Support the PKCS#5/PKCS#12 encryption scheme used by OpenSSL for private keys
authorTobias Brunner <tobias@strongswan.org>
Thu, 11 Apr 2013 17:39:32 +0000 (19:39 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2013 13:02:39 +0000 (15:02 +0200)
src/libstrongswan/crypto/pkcs5.c

index 7a73399..ed2c41a 100644 (file)
@@ -606,6 +606,12 @@ pkcs5_t *pkcs5_from_algorithmIdentifier(chunk_t blob, int level0)
                        this->encr = ENCR_DES;
                        this->data.pbes1.hash = HASH_SHA1;
                        break;
+               case OID_PBE_SHA1_3DES_CBC:
+                       this->scheme = PKCS5_SCHEME_PKCS12;
+                       this->keylen = 24;
+                       this->encr = ENCR_3DES;
+                       this->data.pbes1.hash = HASH_SHA1;
+                       break;
                case OID_PBE_SHA1_RC2_CBC_40:
                        this->scheme = PKCS5_SCHEME_PKCS12;
                        this->keylen = 5;