]> git.saurik.com Git - apple/security.git/commitdiff
Security-55179.13.tar.gz mac-os-x-1084 mac-os-x-1085 v55179.13
authorApple <opensource@apple.com>
Tue, 5 Mar 2013 23:16:45 +0000 (23:16 +0000)
committerApple <opensource@apple.com>
Tue, 5 Mar 2013 23:16:45 +0000 (23:16 +0000)
lib/Info-Security.plist
lib/plugins/csparser-Info.plist
libsecurity_cdsa_utilities/lib/cssmdb.h
libsecurity_cdsa_utilities/lib/cssmpods.cpp
libsecurity_keychain/lib/DLDBListCFPref.cpp
libsecurity_keychain/lib/KeyItem.cpp

index 07a2c2044037bd099729a5b81dfb42c10c62e60f..65447ee78c5fdda08af57c7ade8bd048faf069b1 100644 (file)
@@ -19,6 +19,6 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>55179.11</string>
+       <string>55179.13</string>
 </dict>
 </plist>
index 71e78740a0a657586ea25d3063cd7b2bc125c315..28d41d4924f49347310b7dddb8abd48a735e5c57 100644 (file)
@@ -17,7 +17,7 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>55179.11</string>
+       <string>55179.13</string>
        <key>CFBundleShortVersionString</key>
        <string>3.0</string>
 </dict>
index a8bf1dd334c94f355639bbaaf830d7eb85bf4c8a..f4fa0befa9177a2c65c64e2a14a5b8ca016f6a68 100644 (file)
@@ -672,7 +672,8 @@ public:
     const CssmSubserviceUid &ssuid() const { return mImpl->ssuid(); }
     const char *dbName() const { return mImpl->dbName(); }
     const CssmNetAddress *dbLocation() const { return mImpl->dbLocation(); }
-
+    bool IsImplEmpty() const {return mImpl == NULL;}
+    
     RefPointer<Impl> mImpl;
 };
 
index 60e5ddd08b01603b305b85085f4e31e7f4c4f45e..d17dba4114e777730d8a555864f87b0e48cc45a8 100644 (file)
@@ -133,6 +133,12 @@ CssmSubserviceUid::CssmSubserviceUid(const CSSM_GUID &guid,
 
 bool CssmSubserviceUid::operator == (const CSSM_SUBSERVICE_UID &otherUid) const
 {
+    // make sure we don't crash if we get bad data
+    if (&otherUid == 0x0)
+    {
+        return false;
+    }
+    
        const CssmSubserviceUid &other = CssmSubserviceUid::overlay(otherUid);
        return subserviceId() == other.subserviceId()
                && subserviceType() == other.subserviceType()
@@ -141,6 +147,11 @@ bool CssmSubserviceUid::operator == (const CSSM_SUBSERVICE_UID &otherUid) const
 
 bool CssmSubserviceUid::operator < (const CSSM_SUBSERVICE_UID &otherUid) const
 {
+    if (&otherUid == 0x0)
+    {
+        return false;
+    }
+    
        const CssmSubserviceUid &other = CssmSubserviceUid::overlay(otherUid);
        if (subserviceId() < other.subserviceId())
                return true;
index ee11d931ddae0a5e875e3b881e7b5dc9b0b8b672..7043a1bb22408cb3c15dd7cfb03e0c4e1a04e652 100644 (file)
@@ -863,6 +863,11 @@ DLDbListCFPref::rename(const DLDbIdentifier &oldId, const DLDbIdentifier &newId)
 bool
 DLDbListCFPref::member(const DLDbIdentifier &dldbIdentifier)
 {
+    if (dldbIdentifier.IsImplEmpty())
+    {
+        return false;
+    }
+    
     for (vector<DLDbIdentifier>::const_iterator ix = searchList().begin(); ix != mSearchList.end(); ++ix)
        {
         if (ix->mImpl == NULL)
index 5e91524a72dcc3759917090a5e3780950b570705..0b7149d0770188d89a009a29f39ba4a597a8dd61 100644 (file)
@@ -1158,7 +1158,7 @@ KeyItem::generate(Keychain keychain,
 void KeyItem::RawSign(SecPadding padding, CSSM_DATA dataToSign, const AccessCredentials *credentials, CSSM_DATA& signature)
 {
        CSSM_ALGORITHMS baseAlg = key()->header().algorithm();
-       if (baseAlg != CSSM_ALGID_RSA)
+       if ((baseAlg != CSSM_ALGID_RSA) && (baseAlg != CSSM_ALGID_ECDSA))
        {
                MacOSError::throwMe(paramErr);
        }
@@ -1216,7 +1216,7 @@ void KeyItem::RawSign(SecPadding padding, CSSM_DATA dataToSign, const AccessCred
 void KeyItem::RawVerify(SecPadding padding, CSSM_DATA dataToVerify, const AccessCredentials *credentials, CSSM_DATA sig)
 {
        CSSM_ALGORITHMS baseAlg = key()->header().algorithm();
-       if (baseAlg != CSSM_ALGID_RSA)
+       if ((baseAlg != CSSM_ALGID_RSA) && (baseAlg != CSSM_ALGID_ECDSA))
        {
                MacOSError::throwMe(paramErr);
        }