<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>55163.44</string>
+ <string>55178.0.1</string>
</dict>
</plist>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>55163.44</string>
+ <string>55178.0.1</string>
<key>CFBundleShortVersionString</key>
<string>3.0</string>
</dict>
#include <Security/AuthorizationTagsPriv.h>
#include <Security/SecTask.h>
#include <security_keychain/SecCFTypes.h>
+#include "TrustSettingsSchema.h"
//%%% add this to AuthorizationTagsPriv.h later
#ifndef AGENT_HINT_LOGIN_KC_SUPPRESS_RESET_PANEL
if (!dLDbIdentifier)
return Keychain();
- if (gServerMode) {
- secdebug("servermode", "keychain reference in server mode");
- return Keychain();
- }
-
KeychainMap::iterator it = mKeychains.find(dLDbIdentifier);
if (it != mKeychains.end())
{
}
}
+ if (gServerMode) {
+ secdebug("servermode", "keychain reference in server mode");
+ const char *dbname = dLDbIdentifier.dbName();
+ if (!dbname || (strcmp(dbname, SYSTEM_ROOT_STORE_PATH)!=0))
+ return Keychain();
+ }
+
// The keychain is not in our cache. Create it.
Module module(dLDbIdentifier.ssuid().guid());
DL dl;
#pragma mark -- TrustKeychains --
+static const CSSM_DL_DB_HANDLE nullCSSMDLDBHandle = {0,};
//
// TrustKeychains maintains a global reference to standard system keychains,
// to avoid having them be opened anew for each Trust instance.
public:
TrustKeychains();
~TrustKeychains() {}
- CSSM_DL_DB_HANDLE rootStoreHandle() { return mRootStore->database()->handle(); }
- CSSM_DL_DB_HANDLE systemKcHandle() { return mSystem->database()->handle(); }
+ CSSM_DL_DB_HANDLE rootStoreHandle() { return mRootStore ? mRootStore->database()->handle() : nullCSSMDLDBHandle; }
+ CSSM_DL_DB_HANDLE systemKcHandle() { return mSystem ? mSystem->database()->handle() : nullCSSMDLDBHandle; }
Keychain &rootStore() { return mRootStore; }
Keychain &systemKc() { return mSystem; }
private:
if(mUsingTrustSettings) {
/* Append system anchors for use with Trust Settings */
try {
- dlDbList.push_back(trustKeychains().rootStoreHandle());
+ CSSM_DL_DB_HANDLE rootStoreHandle = trustKeychains().rootStoreHandle();
+ if (rootStoreHandle.DBHandle)
+ dlDbList.push_back(rootStoreHandle);
actionDataP->ActionFlags |= CSSM_TP_ACTION_TRUST_SETTINGS;
}
catch (...) {
mUsingTrustSettings = false;
}
try {
- dlDbList.push_back(trustKeychains().systemKcHandle());
+ CSSM_DL_DB_HANDLE systemKcHandle = trustKeychains().systemKcHandle();
+ if (systemKcHandle.DBHandle)
+ dlDbList.push_back(systemKcHandle);
}
catch(...) {
/* Oh well, at least we got the root store DB */
dtprintf("[%s] SecCmsSignedDataVerifySignerInfo: result: %d, signer: %d\n",
__FUNCTION__, result, jx);
require_noerr(result, xit);
-
+
result = SecTrustEvaluate (trustRef, &trustResultType);
dtprintf("[%s] SecTrustEvaluate: result: %d, trustResult: %s (%d)\n",
__FUNCTION__, result, trustResultTypeString(trustResultType), trustResultType);
static void saveTSACertificates(CSSM_DATA **signingCerts, CFMutableArrayRef outArray)
{
SecKeychainRef defaultKeychain = NULL;
- if (SecKeychainCopyDefault(&defaultKeychain))
- return;
+ // Don't save certificates in keychain to avoid securityd issues
+// if (SecKeychainCopyDefault(&defaultKeychain))
+// defaultKeychain = NULL;
unsigned certCount = SecCmsArrayCount((void **)signingCerts);
unsigned dex;
OSStatus result = errSecUnknownFormat;
CSSM_DATA **signingCerts = NULL;
+ OSStatus currentPORTErr = PORT_GetError();
+ dtprintf("decodeTimeStampToken top: PORT_GetError() %d -----\n", (int)currentPORTErr);
+ PORT_SetError(0);
+
/* decode the message */
require_noerr(result = SecCmsDecoderCreate (NULL, NULL, NULL, NULL, NULL, NULL, NULL, &decoderContext), xit);
result = SecCmsDecoderUpdate(decoderContext, inData->Data, inData->Length);
if(*numCiphers < numCipherSuites) {
return errSSLBufferOverflow;
}
- memcpy(ciphers, cipherSuites, numCipherSuites * 2);
+ memcpy(ciphers, cipherSuites, numCipherSuites * sizeof(SSLCipherSuite));
*numCiphers = numCipherSuites;
return noErr;
}