Fix incorrect RSA key size calculation.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Tue, 31 Aug 2010 22:05:25 +0000 (22:05 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Tue, 31 Aug 2010 22:05:25 +0000 (22:05 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@782 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/security/Credential.h
xmltooling/security/impl/BasicX509Credential.cpp

index 0d2362f..a334d62 100644 (file)
@@ -95,7 +95,7 @@ namespace xmltooling {
         virtual const char* getAlgorithm() const=0;
 
         /**
-         * Returns the size of the key.
+         * Returns the size of the key in bits.
          *
          * @return  the key size, or 0 if indeterminate
          */
index 1a2bbab..5d761ea 100644 (file)
@@ -239,7 +239,7 @@ unsigned int BasicX509Credential::getKeySize() const
             case XSECCryptoKey::KEY_RSA_PUBLIC:
             case XSECCryptoKey::KEY_RSA_PAIR: {
                 XSECCryptoKeyRSA* rkey = static_cast<XSECCryptoKeyRSA*>(m_key);
-                return rkey->getLength();
+                return 8 * rkey->getLength();
             }
 
             case XSECCryptoKey::KEY_SYMMETRIC: {