]> git.saurik.com Git - apple/security.git/blobdiff - AppleCSPDL/SSFactory.cpp
Security-176.tar.gz
[apple/security.git] / AppleCSPDL / SSFactory.cpp
index 1e01a505f7c913bd513d3f541007572689e9c2f5..93f0dcaa90aaeefab58d706a3ad2780f32da4f2e 100644 (file)
@@ -36,8 +36,13 @@ bool SSFactory::setup(SSCSPSession &session, CSPFullPluginSession::CSPContext *
        switch (context.type())
        {
        case CSSM_ALGCLASS_SIGNATURE:
        switch (context.type())
        {
        case CSSM_ALGCLASS_SIGNATURE:
+               cspCtx = new SSSignatureContext(session);
+               return true;
        case CSSM_ALGCLASS_MAC:
        case CSSM_ALGCLASS_MAC:
-               cspCtx = encoding ? new SSSignContext(session) : new SSVerifyContext(session);
+               cspCtx = new SSMACContext(session);
+               return true;
+       case CSSM_ALGCLASS_DIGEST:
+               cspCtx = new SSDigestContext(session);
                return true;
        case CSSM_ALGCLASS_SYMMETRIC:
        case CSSM_ALGCLASS_ASYMMETRIC:
                return true;
        case CSSM_ALGCLASS_SYMMETRIC:
        case CSSM_ALGCLASS_ASYMMETRIC: