]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_codesigning/lib/csutilities.h
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_codesigning / lib / csutilities.h
index 668ffb86bbe0f21c496948091cd68ff2e2838b10..6a69749f1accefafea7c6b78d77839f772d10abc 100644 (file)
@@ -128,6 +128,7 @@ size_t hashFileData(const char *path, _Hash *hasher)
 #if TARGET_OS_OSX
 bool certificateHasField(SecCertificateRef cert, const CSSM_OID &oid);
 bool certificateHasPolicy(SecCertificateRef cert, const CSSM_OID &policyOid);
 #if TARGET_OS_OSX
 bool certificateHasField(SecCertificateRef cert, const CSSM_OID &oid);
 bool certificateHasPolicy(SecCertificateRef cert, const CSSM_OID &policyOid);
+CFDateRef certificateCopyFieldDate(SecCertificateRef cert, const CSSM_OID &policyOid);
 #endif
 
 //
 #endif
 
 //
@@ -224,7 +225,27 @@ private:
        Dispatch::Semaphore *mResourceSemaphore;
 };
 
        Dispatch::Semaphore *mResourceSemaphore;
 };
 
+// Check if the path is on the root filesystem, protected by the OS.
+bool isOnRootFilesystem(const char *path);
 
 
+// Check if a path exists.
+bool pathExists(const char *path);
+
+// Check if the path name represents an extended attribute file (on file systems which don't support
+// them natively).
+bool pathMatchesXattrFilenameSpec(const char *path);
+
+// Check if path is a regular file.
+bool pathIsRegularFile(const char *path);
+
+// Check if a path has any extended attributes.
+bool pathHasXattrs(const char *path);
+
+// Check if the path is on a file system that requires files to store extended attributes.
+bool pathFileSystemUsesXattrFiles(const char *path);
+
+// Check if path is a valid extended attribute file.
+bool pathIsValidXattrFile(const string fullPath, const char *scope = "csutilities");
 
 } // end namespace CodeSigning
 } // end namespace Security
 
 } // end namespace CodeSigning
 } // end namespace Security