snej@4: // snej@4: // MYCertGen.h snej@4: // MYCrypto snej@4: // snej@4: // Created by Jens Alfke on 4/3/09. snej@4: // Copyright 2009 Jens Alfke. All rights reserved. jens@22: jens@22: // NOTE: This module has been replaced by MYCertificateInfo, which isn't dependent on jens@22: // CSSM APIs that aren't available on iPhone. snej@4: snej@4: #import snej@4: #import snej@4: snej@4: @class MYPublicKey, MYPrivateKey, MYCertificate, MYIdentity; snej@4: snej@4: snej@4: NSData* MYCertificateCreateTemplate(const CSSM_X509_NAME *subject, const CSSM_X509_NAME *issuer, snej@4: NSDate *validFrom, NSDate *validTo, snej@4: uint32_t serialNumber, snej@4: const CSSM_X509_EXTENSION **extensions, unsigned nExtensions, snej@4: MYPublicKey *publicKey, snej@4: const CSSM_X509_ALGORITHM_IDENTIFIER *signingAlgorithm, snej@4: CSSM_CL_HANDLE clHandle); snej@4: snej@4: NSData* MYCertificateSign(NSData *certificateTemplate, snej@4: MYPrivateKey *privateKey, snej@4: CSSM_ALGORITHMS signingAlgorithmID, snej@4: CSSM_CL_HANDLE cssmCLHandle); snej@4: snej@4: MYCertificate *createCertificate(const CSSM_X509_NAME *subject, const CSSM_X509_NAME *issuer, snej@4: NSDate *validFrom, NSDate *validTo, snej@4: uint32_t serialNumber, snej@4: const CSSM_X509_EXTENSION **extensions, unsigned nExtensions, snej@4: MYPrivateKey *privateKey, snej@4: const CSSM_X509_ALGORITHM_IDENTIFIER *signingAlgorithm, snej@4: CSSM_ALGORITHMS signingAlgorithmID, snej@4: CSSM_CL_HANDLE cssmCLHandle); snej@4: snej@4: CSSM_CL_HANDLE getCLHandle(); snej@4: snej@4: snej@4: MYCertificate* MYCertificateCreateSelfSigned(MYPrivateKey *privateKey, snej@4: NSDictionary *attributes ); snej@4: MYIdentity* MYIdentityCreateSelfSigned(MYPrivateKey *privateKey, snej@4: NSDictionary *attributes );