]> git.saurik.com Git - apple/libsecurity_codesigning.git/blobdiff - lib/signerutils.h
libsecurity_codesigning-55037.15.tar.gz
[apple/libsecurity_codesigning.git] / lib / signerutils.h
index 92d48f37256cbeaa6b552ce4eceb02e3c1de2eef..3fdb081565ec78eddf78687ebdfbdb7d97af32e4 100644 (file)
@@ -39,6 +39,21 @@ namespace Security {
 namespace CodeSigning {
 
 
+//
+// A helper to deal with the magic merger logic of internal requirements
+//
+class InternalRequirements : public Requirements::Maker {
+public:
+       InternalRequirements() : mReqs(NULL) { }
+       ~InternalRequirements() { ::free((void *)mReqs); }
+       void operator () (const Requirements *given, const Requirements *defaulted, const Requirement::Context &context);
+       operator const Requirements * () const { return mReqs; }
+
+private:
+       const Requirements *mReqs;
+};
+
+
 //
 // A DiskRep::Writer that assembles data in a SuperBlob (in memory)
 //
@@ -165,6 +180,21 @@ private:
 };
 
 
+//
+// A Requirement::Context populated from a signing request.
+// We use this to help generate the explicit Designated Requirement
+// during signing ops, and thus this must be constructed BEFORE we
+// actually have a signed object.
+//
+class PreSigningContext : public Requirement::Context {
+public:
+       PreSigningContext(const SecCodeSigner::Signer &signer);
+
+private:
+       CFRef<CFArrayRef> mCerts;               // hold cert chain
+};
+
+
 } // end namespace CodeSigning
 } // end namespace Security