Also support 128-bit RC2
authorTobias Brunner <tobias@strongswan.org>
Fri, 12 Apr 2013 10:10:22 +0000 (12:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2013 13:02:39 +0000 (15:02 +0200)
src/libstrongswan/crypto/pkcs5.c

index ed2c41a..679d270 100644 (file)
@@ -613,8 +613,9 @@ pkcs5_t *pkcs5_from_algorithmIdentifier(chunk_t blob, int level0)
                        this->data.pbes1.hash = HASH_SHA1;
                        break;
                case OID_PBE_SHA1_RC2_CBC_40:
+               case OID_PBE_SHA1_RC2_CBC_128:
                        this->scheme = PKCS5_SCHEME_PKCS12;
-                       this->keylen = 5;
+                       this->keylen = (oid == OID_PBE_SHA1_RC2_CBC_40) ? 5 : 16;
                        this->encr = ENCR_RC2_CBC;
                        this->data.pbes1.hash = HASH_SHA1;
                        break;