X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/866f8763175ff60e4fa455b92b5eb660a12fe6c7..refs/heads/master:/OSX/libsecurity_codesigning/lib/csutilities.h diff --git a/OSX/libsecurity_codesigning/lib/csutilities.h b/OSX/libsecurity_codesigning/lib/csutilities.h index 668ffb86..6a69749f 100644 --- a/OSX/libsecurity_codesigning/lib/csutilities.h +++ b/OSX/libsecurity_codesigning/lib/csutilities.h @@ -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); +CFDateRef certificateCopyFieldDate(SecCertificateRef cert, const CSSM_OID &policyOid); #endif // @@ -224,7 +225,27 @@ private: 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