]> git.saurik.com Git - apple/security.git/blobdiff - AppleCSPDL/SSCSPSession.h
Security-176.tar.gz
[apple/security.git] / AppleCSPDL / SSCSPSession.h
index 97daab1f3ad2184096ef926a8d90a28d6c17adae..3fce19193e65e8740307a5cd7332cd616505169d 100644 (file)
@@ -37,7 +37,8 @@ class SSCSPSession : public CSPFullPluginSession
 public:
        SSCSPDLSession &mSSCSPDLSession;
        SSFactory &mSSFactory;
-
+       CssmClient::CSP &mRawCsp;
+       
        SSCSPSession(CSSM_MODULE_HANDLE handle,
                                 CSPDLPlugin &plug,
                                 const CSSM_VERSION &version,
@@ -45,10 +46,11 @@ public:
                                 CSSM_SERVICE_TYPE subserviceType,
                                 CSSM_ATTACH_FLAGS attachFlags,
                                 const CSSM_UPCALLS &upcalls,
-                                SSCSPDLSession &ssCSPDLSession);
+                                SSCSPDLSession &ssCSPDLSession,
+                                CssmClient::CSP &rawCsp);
 
        SecurityServer::ClientSession &clientSession()
-       { return mSSCSPDLSession.clientSession(); }
+       { return mClientSession; }
 
        CSPContext *contextCreate(CSSM_CC_HANDLE handle, const Context &context);
 #if 0
@@ -60,7 +62,8 @@ public:
 
        void setupContext(CSPContext * &ctx, const Context &context,
                                          bool encoding);
-
+       
+       SSDatabase getDatabase(CSSM_DL_DB_HANDLE *aDLDbHandle);
        SSDatabase getDatabase(const Context &context);
 
        void makeReferenceKey(SecurityServer::KeyHandle inKeyHandle,
@@ -159,6 +162,11 @@ public:
                                        uint32 PassThroughId,
                                        const void *InData,
                                        void **OutData);
+private:
+       /* Validate requested key attr flags for newly generated keys */
+       void validateKeyAttr(uint32 reqKeyAttr);
+
+       SecurityServer::ClientSession mClientSession;
 };