[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp

noreply at shibboleth.net noreply at shibboleth.net
Wed Aug 10 17:10:56 BST 2011


Author: scantor
Date: Wed Aug 10 17:10:55 2011
New Revision: 897

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=897&view=rev
Log:
Remove PKCS 1.5 default for 3DES keys.

Modified:
    branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp

Modified: branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp?rev=897&r1=896&r2=897&view=diff
==============================================================================
--- branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp (original)
+++ branches/REL_1/xmltooling/encryption/impl/Encrypter.cpp Wed Aug 10 17:10:55 2011
@@ -338,18 +338,10 @@
     XMLToolingConfig& conf = XMLToolingConfig::getConfig();
     const char* alg = credential.getAlgorithm();
     if (!alg || !strcmp(alg, "RSA")) {
-        if (XMLString::equals(encryptionAlg,DSIGConstants::s_unicodeStrURI3DES_CBC)) {
-            if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_1_5, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
-                return DSIGConstants::s_unicodeStrURIRSA_1_5;
-            else if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
-                return DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1;
-        }
-        else {
-            if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
-                return DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1;
-            else if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_1_5, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
-                return DSIGConstants::s_unicodeStrURIRSA_1_5;
-        }
+        if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
+            return DSIGConstants::s_unicodeStrURIRSA_OAEP_MGFP1;
+        else if (conf.isXMLAlgorithmSupported(DSIGConstants::s_unicodeStrURIRSA_1_5, XMLToolingConfig::ALGTYPE_KEYENCRYPT))
+            return DSIGConstants::s_unicodeStrURIRSA_1_5;
     }
     else if (!strcmp(alg, "AES")) {
         const XMLCh* ret = nullptr;



More information about the commits mailing list