]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_smime/lib/SecCmsContentInfo.h
Security-57740.60.18.tar.gz
[apple/security.git] / libsecurity_smime / lib / SecCmsContentInfo.h
index 6987124e6fd7efa1a6ca4012bd32248fba5f97d9..f0d72c49f29e816f47efad0dd1260bba21ccfdef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
+ *  Copyright (c) 2004,2008,2010 Apple Inc. All Rights Reserved.
  *
  *  @APPLE_LICENSE_HEADER_START@
  *  
@@ -23,7 +23,7 @@
 
 /*!
     @header SecCmsContentInfo.h
-    @copyright 2004 Apple Computer, Inc. All Rights Reserved.
+    @Copyright (c) 2004,2008,2010 Apple Inc. All Rights Reserved.
 
     @availability 10.4 and later
     @abstract Interfaces of the CMS implementation.
@@ -36,6 +36,7 @@
 #define _SECURITY_SECCMSCONTENTINFO_H_  1
 
 #include <Security/SecCmsBase.h>
+#include <CoreFoundation/CFData.h>
 
 
 #if defined(__cplusplus)
@@ -68,7 +69,7 @@ SecCmsContentInfoGetContent(SecCmsContentInfoRef cinfo);
     @abstract Get pointer to innermost content
     @discussion This is typically only called by SecCmsMessageGetContent().
  */
-extern CSSM_DATA_PTR
+extern const SecAsn1Item *
 SecCmsContentInfoGetInnerContent(SecCmsContentInfoRef cinfo);
 
 /*!
@@ -83,7 +84,7 @@ SecCmsContentInfoGetContentTypeTag(SecCmsContentInfoRef cinfo);
     @abstract Find out and return the inner content type.
     @discussion Caches pointer to lookup result for future reference.
  */
-extern CSSM_OID *
+extern SecAsn1Oid *
 SecCmsContentInfoGetContentTypeOID(SecCmsContentInfoRef cinfo);
 
 /*!
@@ -106,21 +107,19 @@ SecCmsContentInfoGetContentEncAlg(SecCmsContentInfoRef cinfo);
 /*!
     @function
     @abstract Set a ContentInfos content to a Data
-    @param cmsg A Message object to which the cinfo object belongs.
     @param cinfo A ContentInfo object of which we want set the content.
-    @param data A pointer to a CSSM_DATA object or NULL if data will be provided during SecCmsEncoderUpdate calls.
+    @param data A CFDataRef or NULL if data will be provided during SecCmsEncoderUpdate calls.
     @param detached True if the content is to be deattched from the CMS message rather than included within it.
     @result A result code. See "SecCmsBase.h" for possible results.
-    @discussion This function requires a ContentInfo object which can be made by creating a SecCmsMessage object.  If the call succeeds the passed in data will be owned by the reciever.  The data->Data must have been allocated using the cmsg's SecArenaPool if it is present.
+    @discussion This function requires a ContentInfo object which can be made by creating a SecCmsMessage object.
     @availability 10.4 and later
  */
 extern OSStatus
-SecCmsContentInfoSetContentData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, CSSM_DATA_PTR data, Boolean detached);
+SecCmsContentInfoSetContentData(SecCmsContentInfoRef cinfo, CFDataRef data, Boolean detached);
 
 /*!
     @function
     @abstract Set a ContentInfos content to a SignedData.
-    @param cmsg A Message object to which the cinfo object belongs.
     @param cinfo A ContentInfo object of which we want set the content.
     @param sigd A SignedData object to set as the content of the cinfo object.
     @result A result code. See "SecCmsBase.h" for possible results.
@@ -128,12 +127,11 @@ SecCmsContentInfoSetContentData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinf
     @availability 10.4 and later
  */
 extern OSStatus
-SecCmsContentInfoSetContentSignedData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, SecCmsSignedDataRef sigd);
+SecCmsContentInfoSetContentSignedData(SecCmsContentInfoRef cinfo, SecCmsSignedDataRef sigd);
 
 /*!
     @function
     @abstract Set a ContentInfos content to a EnvelopedData.
-    @param cmsg A Message object to which the cinfo object belongs.
     @param cinfo A ContentInfo object of which we want set the content.
     @param envd A EnvelopedData object to set as the content of the cinfo object.
     @result A result code. See "SecCmsBase.h" for possible results.
@@ -141,12 +139,11 @@ SecCmsContentInfoSetContentSignedData(SecCmsMessageRef cmsg, SecCmsContentInfoRe
     @availability 10.4 and later
  */
 extern OSStatus
-SecCmsContentInfoSetContentEnvelopedData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, SecCmsEnvelopedDataRef envd);
+SecCmsContentInfoSetContentEnvelopedData(SecCmsContentInfoRef cinfo, SecCmsEnvelopedDataRef envd);
 
 /*!
     @function
     @abstract Set a ContentInfos content to a DigestedData.
-    @param cmsg A Message object to which the cinfo object belongs.
     @param cinfo A ContentInfo object of which we want set the content.
     @param digd A DigestedData object to set as the content of the cinfo object.
     @result A result code. See "SecCmsBase.h" for possible results.
@@ -154,12 +151,11 @@ SecCmsContentInfoSetContentEnvelopedData(SecCmsMessageRef cmsg, SecCmsContentInf
     @availability 10.4 and later
  */
 extern OSStatus
-SecCmsContentInfoSetContentDigestedData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, SecCmsDigestedDataRef digd);
+SecCmsContentInfoSetContentDigestedData(SecCmsContentInfoRef cinfo, SecCmsDigestedDataRef digd);
 
 /*!
     @function
     @abstract Set a ContentInfos content to a EncryptedData.
-    @param cmsg A Message object to which the cinfo object belongs.
     @param cinfo A ContentInfo object of which we want set the content.
     @param encd A EncryptedData object to set as the content of the cinfo object.
     @result A result code. See "SecCmsBase.h" for possible results.
@@ -167,23 +163,20 @@ SecCmsContentInfoSetContentDigestedData(SecCmsMessageRef cmsg, SecCmsContentInfo
     @availability 10.4 and later
  */
 extern OSStatus
-SecCmsContentInfoSetContentEncryptedData(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, SecCmsEncryptedDataRef encd);
-
-OSStatus
-SecCmsContentInfoSetContentOther(SecCmsMessageRef cmsg, SecCmsContentInfoRef cinfo, CSSM_DATA_PTR data, Boolean detached, const CSSM_OID *eContentType);
+SecCmsContentInfoSetContentEncryptedData(SecCmsContentInfoRef cinfo, SecCmsEncryptedDataRef encd);
 
 /*!
     @function
  */
 extern OSStatus
-SecCmsContentInfoSetContentEncAlg(SecArenaPoolRef pool, SecCmsContentInfoRef cinfo,
-                                   SECOidTag bulkalgtag, CSSM_DATA_PTR parameters, int keysize);
+SecCmsContentInfoSetContentEncAlg(SecCmsContentInfoRef cinfo,
+                                   SECOidTag bulkalgtag, const SecAsn1Item *parameters, int keysize);
 
 /*!
     @function
  */
 extern OSStatus
-SecCmsContentInfoSetContentEncAlgID(SecArenaPoolRef pool, SecCmsContentInfoRef cinfo,
+SecCmsContentInfoSetContentEncAlgID(SecCmsContentInfoRef cinfo,
                                    SECAlgorithmID *algid, int keysize);
 
 /*!