]> git.saurik.com Git - apple/security.git/blobdiff - AppleCSP/CryptKitCSP/cryptkitcsp.cpp
Security-54.1.tar.gz
[apple/security.git] / AppleCSP / CryptKitCSP / cryptkitcsp.cpp
index 24827a03b3304fb830a1576871d9e2b56a62e052..ea97af756291b5435203ead545619b7937f46e00 100644 (file)
@@ -31,6 +31,7 @@
 #include <CryptKit/falloc.h>
 #include <CryptKit/feeFunctions.h>
 #include <MiscCSPAlgs/SHA1_MD5_Object.h>
+#include <Security/digestobject.h>
 
 CssmAllocator *CryptKitFactory::normAllocator;
 CssmAllocator *CryptKitFactory::privAllocator;
@@ -107,6 +108,26 @@ bool CryptKitFactory::setup(
                                                                *privAllocator)));
                                        }
                                        return true;
+                               case CSSM_ALGID_FEE:
+                                       if(cspCtx == NULL) {
+                                               cspCtx = new SignatureContext(session,
+                                                       *(new NullDigest()),
+                                                       *(new FEERawSigner(feeRandCallback, 
+                                                               &session,
+                                                               session,
+                                                               *privAllocator)));
+                                       }
+                                       return true;
+                               case CSSM_ALGID_ECDSA:
+                                       if(cspCtx == NULL) {
+                                               cspCtx = new SignatureContext(session,
+                                                       *(new NullDigest()),
+                                                       *(new FEEECDSASigner(feeRandCallback, 
+                                                               &session,
+                                                               session,
+                                                               *privAllocator)));
+                                       }
+                                       return true;
                                default:
                                        break;
                        }