]> git.saurik.com Git - apple/security.git/blobdiff - libsecurity_smime/lib/SecCmsBase.h
Security-58286.41.2.tar.gz
[apple/security.git] / libsecurity_smime / lib / SecCmsBase.h
index eed12460ef6a76c8521ac22aaed35c161c85100f..0111155bc98bb23866382e585a85a10c201d3ccd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
+ *  Copyright (c) 2004,2008,2010-2011 Apple Inc. All Rights Reserved.
  *
  *  @APPLE_LICENSE_HEADER_START@
  *  
@@ -23,7 +23,7 @@
 
 /*!
     @header SecCmsBase.h
-    @copyright 2004 Apple Computer, Inc. All Rights Reserved.
+    @Copyright (c) 2004,2008,2010-2011 Apple Inc. All Rights Reserved.
 
     @availability 10.4 and later
     @abstract Interfaces of the CMS implementation.
 #ifndef _SECURITY_SECCMSBASE_H_
 #define _SECURITY_SECCMSBASE_H_  1
 
-#include <sys/types.h>                 /* size_t */
+#include <Security/SecBase.h>
 #include <Security/SecKey.h>
-#include <Security/x509defs.h>
+#include <Security/SecAsn1Types.h>
+
+#if !SEC_OS_OSX_INCLUDES
+#if !USE_CDSA_CRYPTO
+typedef CFTypeRef SecKeychainRef;
+#endif
+#endif // ! SEC_OS_OSX_INCLUDES
 
 #if defined(__cplusplus)
 extern "C" {
@@ -53,13 +59,13 @@ typedef struct SECOidDataStr SECOidData;
     @typedef
     @discussion XXX We might want to get rid of this alltogether.
  */
-typedef CSSM_X509_ALGORITHM_IDENTIFIER SECAlgorithmID;
+typedef SecAsn1AlgId SECAlgorithmID;
 
 /*!
     @typedef
     @discussion XXX This should probably move to SecKey.h
  */
-typedef SecKeyRef SecSymmetricKeyRef;
+typedef void * SecSymmetricKeyRef;
 
 /*!
     @typedef
@@ -78,11 +84,6 @@ typedef SecKeyRef SecPrivateKeyRef;
  */
 typedef void(*PK11PasswordFunc)(void);
 
-/*!
-    @typedef
- */
-typedef struct SecArenaPoolStr *SecArenaPoolRef;
-
 /*!
     @typedef
  */
@@ -170,10 +171,7 @@ typedef enum {
     SecCmsVSSignatureAlgorithmUnknown = 6,
     SecCmsVSSignatureAlgorithmUnsupported = 7,
     SecCmsVSMalformedSignature = 8,
-    SecCmsVSProcessingError = 9,
-    SecCmsVSTimestampMissing = 10,                      /* A timestamp was expected but was not found. */
-    SecCmsVSTimestampInvalid = 11,                      /* The timestamp was not valid. */
-    SecCmsVSTimestampNotTrusted = 12,                   /* The timestamp signing chain was not trusted. */
+    SecCmsVSProcessingError = 9
 } SecCmsVerificationStatus;
 
 /*!
@@ -428,7 +426,7 @@ typedef enum {
     /* New PSM certificate management OIDs */
     SEC_OID_CERT_RENEWAL_LOCATOR = 177,
     SEC_OID_NS_CERT_EXT_SCOPE_OF_USE = 178,
-    
+
     /* CMS (RFC2630) OIDs */
     SEC_OID_CMS_EPHEMERAL_STATIC_DIFFIE_HELLMAN = 179,
     SEC_OID_CMS_3DES_KEY_WRAP = 180,
@@ -449,59 +447,46 @@ typedef enum {
 
     SEC_OID_MS_SMIME_ENCRYPTION_KEY_PREFERENCE = 190,
 
-    SEC_OID_SHA256              = 191,
-    SEC_OID_SHA384              = 192,
-    SEC_OID_SHA512              = 193,
+    SEC_OID_SHA224              = 191,
+    SEC_OID_SHA256              = 192,
+    SEC_OID_SHA384              = 193,
+    SEC_OID_SHA512              = 194,
 
-    SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION = 194,
-    SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION = 195,
-    SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION = 196,
+    SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION = 195,
+    SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION = 196,
+    SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION = 197,
 
-    SEC_OID_AES_128_KEY_WRAP   = 197,
-    SEC_OID_AES_192_KEY_WRAP   = 198,
-    SEC_OID_AES_256_KEY_WRAP   = 199,
+    SEC_OID_AES_128_KEY_WRAP   = 198,
+    SEC_OID_AES_192_KEY_WRAP   = 199,
+    SEC_OID_AES_256_KEY_WRAP   = 200,
 
-    /* eContentType set by client and not understood by this library; treated 
+    /* eContentType set by client and not understood by this library; treated
      * like SEC_OID_PKCS7_DATA, except the caller's OID is encoded. */
-    SEC_OID_OTHER              = 200,
-    
-       /* ECDSA */
-       SEC_OID_EC_PUBLIC_KEY  = 201,
-       SEC_OID_ECDSA_WithSHA1 = 202,
-       SEC_OID_DH_SINGLE_STD_SHA1KDF = 203,
-       SEC_OID_SECP_256_R1 = 204,
-       SEC_OID_SECP_384_R1 = 205,
-       SEC_OID_SECP_521_R1 = 206,
-       
+    SEC_OID_OTHER              = 201,
+
+    /* ECDSA */
+    SEC_OID_EC_PUBLIC_KEY  = 202,
+    SEC_OID_ECDSA_WithSHA1 = 203,
+    SEC_OID_DH_SINGLE_STD_SHA1KDF = 204,
+    SEC_OID_SECP_256_R1 = 205,
+    SEC_OID_SECP_384_R1 = 206,
+    SEC_OID_SECP_521_R1 = 207,
+
     /* RFC 3161 Timestamping OIDs */
-    SEC_OID_PKCS9_ID_CT_TSTInfo = 207,
-    SEC_OID_PKCS9_TIMESTAMP_TOKEN = 208,
-    SEC_OID_PKCS9_SIGNING_CERTIFICATE = 209,
+    SEC_OID_PKCS9_ID_CT_TSTInfo = 208,
+    SEC_OID_PKCS9_TIMESTAMP_TOKEN = 209,
+    SEC_OID_PKCS9_SIGNING_CERTIFICATE = 210,
 
-    SEC_OID_TOTAL
-} SECOidTag;
+    /* ECDSA with SHA2 */
+    SEC_OID_ECDSA_WITH_SHA256 = 211,
+    SEC_OID_ECDSA_WITH_SHA384 = 212,
+    SEC_OID_ECDSA_WITH_SHA512 = 213,
 
-/*!
-    @function
-    @abstract Create a new SecArenaPool object.
-    @param chunksize Size of the chunks the pool will use to allocate its underlying storage.
-    @param outArena pointer to a SecArenaPoolRef to be created.
-    @result On success return 0 and outArena will contain a newly created SecArenaPoolRef.
-    @availability 10.4 and later
-    @updated 2004-04-23
- */
-OSStatus SecArenaPoolCreate(size_t chunksize, SecArenaPoolRef *outArena);
+    /* Apple CMS Attribute */
+    SEC_OID_APPLE_HASH_AGILITY = 214,
 
-/*!
-    @function
-    @abstract Free a SecArenaPool object and everything in it.
-    @param arena The SecArenaPool object to free.
-    @param zero If this is true the arena's memory will be zero filled before it is freed.
-    @result arena will no longer be valid and the memory used by it is returned to the malloc heap.
-    @availability 10.4 and later
-    @updated 2004-04-23
- */
-void SecArenaPoolFree(SecArenaPoolRef arena, Boolean zero);
+    SEC_OID_TOTAL
+} SECOidTag;
 
 
 #if defined(__cplusplus)