]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_smime/lib/SecCMS.h
Security-58286.1.32.tar.gz
[apple/security.git] / OSX / libsecurity_smime / lib / SecCMS.h
index 52ca2d729cc4d46e7761c238b975c0330367a3f4..3c07a0ad275ebbd2c0460fbac909115e90ce3c1b 100644 (file)
@@ -37,6 +37,7 @@ extern const void * kSecCMSAdditionalCerts;
 extern const void * kSecCMSSignedAttributes;
 extern const void * kSecCMSSignDate;
 extern const void * kSecCMSAllCerts;
+extern const void * kSecCMSHashAgility;
 
 extern const void * kSecCMSHashingAlgorithmSHA1;
 extern const void * kSecCMSHashingAlgorithmSHA256;
@@ -95,6 +96,35 @@ OSStatus SecCMSVerifySignedData(CFDataRef message, CFDataRef detached_contents,
                                 CFTypeRef policy, SecTrustRef *trustref, CFArrayRef additional_certificates,
                                 CFDataRef *attached_contents, CFDictionaryRef *message_attributes);
 
+/*!
+ @function SecCMSSignDataAndAttributes
+ @abstract create a signed data cms blob.
+ @param identity signer
+ @param data message to be signed
+ @param detached sign detached or not
+ @param signed_data (output) return signed message.
+ @param signed_attributes (input/optional) signed attributes to insert
+ as a CFDictionary from oids (CFData) to value (CFData).
+ @result A result code.  See "Security Error Codes" (SecBase.h).
+ errSecParam garbage in, garbage out.
+ */
+OSStatus SecCMSSignDataAndAttributes(SecIdentityRef identity, CFDataRef data,
+                                     bool detached, CFMutableDataRef signed_data, CFDictionaryRef signed_attributes);
+
+/*!
+ @function SecCMSSignDigestAndAttributes
+ @abstract create a detached signed data cms blob for a SHA-1 hash.
+ @param identity signer
+ @param digest SHA-1 digest of message to be signed
+ @param signed_data (output) return signed message.
+ @param signed_attributes (input/optional) signed attributes to insert
+ as a CFDictionary from oids (CFData) to value (CFData).
+ @result A result code.  See "Security Error Codes" (SecBase.h).
+ errSecParam garbage in, garbage out.
+ */
+OSStatus SecCMSSignDigestAndAttributes(SecIdentityRef identity, CFDataRef digest,
+                                       CFMutableDataRef signed_data, CFDictionaryRef signed_attributes);
+
 /*!
        @function SecCMSCreateSignedData
  @abstract create a signed data cms blob.