/*
- * Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
+ * Copyright (c) 2004,2008,2010,2013 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
/*!
@header SecCmsSignerInfo.h
- @copyright 2004 Apple Computer, Inc. All Rights Reserved.
+ @Copyright (c) 2004,2008,2010,2013 Apple Inc. All Rights Reserved.
@availability 10.4 and later
@abstract Interfaces of the CMS implementation.
@function
*/
extern SecCmsSignerInfoRef
-SecCmsSignerInfoCreate(SecCmsMessageRef cmsg, SecIdentityRef identity, SECOidTag digestalgtag);
+SecCmsSignerInfoCreate(SecCmsSignedDataRef sigd, SecIdentityRef identity, SECOidTag digestalgtag);
/*!
@function
*/
extern SecCmsSignerInfoRef
-SecCmsSignerInfoCreateWithSubjKeyID(SecCmsMessageRef cmsg, CSSM_DATA_PTR subjKeyID, SecPublicKeyRef pubKey, SecPrivateKeyRef signingKey, SECOidTag digestalgtag);
-
-/*!
- @function
- @abstract Destroy a SignerInfo data structure.
- */
-extern void
-SecCmsSignerInfoDestroy(SecCmsSignerInfoRef si);
+SecCmsSignerInfoCreateWithSubjKeyID(SecCmsSignedDataRef sigd, const SecAsn1Item *subjKeyID, SecPublicKeyRef pubKey, SecPrivateKeyRef signingKey, SECOidTag digestalgtag);
/*!
@function
extern SecCmsVerificationStatus
SecCmsSignerInfoGetVerificationStatus(SecCmsSignerInfoRef signerinfo);
-/*!
- @function
- */
-extern OSStatus
-SecCmsSignerInfoVerifyUnAuthAttrs(SecCmsSignerInfoRef signerinfo);
-
-/*!
- @function
- */
-extern CSSM_DATA *
-SecCmsSignerInfoGetEncDigest(SecCmsSignerInfoRef signerinfo);
-
/*!
@function
*/
extern CFArrayRef
SecCmsSignerInfoGetCertList(SecCmsSignerInfoRef signerinfo);
-/*!
- @function
- */
-extern CFArrayRef
-SecCmsSignerInfoGetTimestampCertList(SecCmsSignerInfoRef signerinfo);
-
/*!
@function
@abstract Return the signing time, in UTCTime format, of a CMS signerInfo.
SecCmsSignerInfoGetSigningTime(SecCmsSignerInfoRef sinfo, CFAbsoluteTime *stime);
/*!
- @function
- @abstract Return the timestamp time, in UTCTime format, of a CMS signerInfo.
- @param sinfo SignerInfo data for this signer.
- @discussion Returns a pointer to XXXX (what?)
- @result A return value of NULL is an error.
+ @function
+ @abstract Return the data in the signed Codesigning Hash Agility attribute.
+ @param sinfo SignerInfo data for this signer, pointer to a CFDataRef for attribute value
+ @discussion Returns a CFDataRef containing the value of the attribute
+ @result A return value of SECFailure is an error.
*/
-OSStatus
-SecCmsSignerInfoGetTimestampTime(SecCmsSignerInfoRef sinfo, CFAbsoluteTime *stime);
+extern OSStatus
+SecCmsSignerInfoGetAppleCodesigningHashAgility(SecCmsSignerInfoRef sinfo, CFDataRef *sdata);
/*!
@function
@discussion Returns a CFStringRef containing the common name of the signer.
@result A return value of NULL is an error.
*/
-extern CFStringRef
+extern CF_RETURNS_RETAINED CFStringRef
SecCmsSignerInfoGetSignerCommonName(SecCmsSignerInfoRef sinfo);
/*!
@discussion Returns a CFStringRef containing the name of the signer.
@result A return value of NULL is an error.
*/
-extern CFStringRef
+extern CF_RETURNS_RETAINED CFStringRef
SecCmsSignerInfoGetSignerEmailAddress(SecCmsSignerInfoRef sinfo);
/*!
OSStatus
SecCmsSignerInfoAddMSSMIMEEncKeyPrefs(SecCmsSignerInfoRef signerinfo, SecCertificateRef cert, SecKeychainRef keychainOrArray);
-/*!
- @function
- @abstract Create a timestamp unsigned attribute with a TimeStampToken.
- */
-OSStatus
-SecCmsSignerInfoAddTimeStamp(SecCmsSignerInfoRef signerinfo, CSSM_DATA *tstoken);
-
/*!
@function
@abstract Countersign a signerinfo.
SecCmsSignerInfoAddCounterSignature(SecCmsSignerInfoRef signerinfo,
SECOidTag digestalg, SecIdentityRef identity);
+/*!
+ @function
+ @abstract Add the Apple Codesigning Hash Agility attribute to the authenticated (i.e. signed) attributes of "signerinfo".
+ @discussion This is expected to be included in outgoing signed Apple code signatures.
+*/
+OSStatus
+SecCmsSignerInfoAddAppleCodesigningHashAgility(SecCmsSignerInfoRef signerinfo, CFDataRef attrValue);
+
/*!
@function
@abstract The following needs to be done in the S/MIME layer code after signature of a signerinfo has been verified.
extern const char *
SecCmsUtilVerificationStatusToString(SecCmsVerificationStatus vs);
-/*
- * Preference domain and key for the Microsoft ECDSA compatibility flag.
- * Default if not present is TRUE, meaning we generate ECDSA-signed messages
- * which are compatible with Microsoft Entourage. FALSE means we adhere to
- * the spec (RFC 3278 section 2.1.1).
- */
-#define kMSCompatibilityDomain "com.apple.security.smime"
-#define kMSCompatibilityMode CFSTR("MSCompatibilityMode")
#if defined(__cplusplus)
}