Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: digital signatures



Hi Cole,

I don't have any experience with the CSSM APIs, but I have found the OpenSSL PKCS#7 APIs to be good and relatively easy to use for generating (and verifying) digital signatures.

Try "man PKCS7_sign", or look at /usr/include/openssl/pkcs7.h. The OpenSSL source code for PKCS7_sign has also been useful, just in case PKCS7_sign doesn't do exactly what you want.

Hope this helps,
Jamie

From: "Cole Barnes" <email@hidden>
To: "Apple CDSA" <email@hidden>
Subject: digital signatures
Date: Thu, 11 May 2006 12:01:38 -0500

I'm writing a program to generate digital signatures.  As a
requirement, the end product MUST be a PKCS7 signature.  So, I have a
few questions.

1:)  What little documentation I've found has pointed me toward using
the CSSM APIs.  For example, the CSSM_CSP_CreateSignatureContext and
CSSM_SignData functions used to generate a signature.  This procedure
will return a raw signature, but because of requirements I need a
PKCS7 signature.  Are there any higher level calls or any built-in
APIs for generating P7 signatures?  Or will I need to use that raw
signature and construct a P7 myself?

2:)  When I use the method above, I get a
CSSMERR_CSP_OPERATION_AUTH_DENIED (0x80010820) error when trying to
use private keys from my keychain.  My best guess is that this is
caused by the fact that I'm passing in NULL for the
CSSM_ACCESS_CREDENTIALS parameter in CSSM_CSP_CreateSignatureContext.
Do I need to build this credential structure myself or is it returned
by some function that I'm not aware of?

I haven't found much *useful* documentation on this subject, so if any
of you can point me in the right direction, I would be eternally
greatful.

-Thanks
Cole
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden
References: 
 >digital signatures (From: "Cole Barnes" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.