]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | /* | |
3 | * Copyright (c) 2001-2004 Apple Computer, Inc. All rights reserved. | |
4 | * | |
5 | * @APPLE_LICENSE_HEADER_START@ | |
6 | * | |
7 | * The contents of this file constitute Original Code as defined in and | |
8 | * are subject to the Apple Public Source License Version 1.1 (the | |
9 | * "License"). You may not use this file except in compliance with the | |
10 | * License. Please obtain a copy of the License at | |
11 | * http://www.apple.com/publicsource and read it before using this file. | |
12 | * | |
13 | * This Original Code and all software distributed under the License are | |
14 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
18 | * License for the specific language governing rights and limitations | |
19 | * under the License. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | ||
24 | #ifndef __CRYPTO_CSSM_H__ | |
25 | #define __CRYPTO_CSSM_H__ | |
26 | ||
27 | /* | |
28 | * Racoon module for verifying and signing certificates through Security | |
29 | * Framework and CSSM | |
30 | */ | |
31 | ||
32 | #include "vmbuf.h" | |
33 | #include <CoreFoundation/CoreFoundation.h> | |
34 | #include <Security/SecBase.h> | |
35 | ||
36 | ||
37 | extern cert_status_t crypto_cssm_check_x509cert_dates (SecCertificateRef certificateRef); | |
38 | extern int crypto_cssm_check_x509cert (cert_t *hostcert, cert_t *certchain, CFStringRef hostname, SecKeyRef *publicKeyRef); | |
39 | extern int crypto_cssm_verify_x509sign(SecKeyRef publicKeyRef, vchar_t *hash, vchar_t *signature, Boolean useSHA1); | |
40 | extern SecCertificateRef crypto_cssm_x509cert_CreateSecCertificateRef (vchar_t *cert); | |
41 | extern vchar_t* crypto_cssm_getsign(CFDataRef persistentCertRef, vchar_t* hash); | |
42 | extern vchar_t* crypto_cssm_get_x509cert(CFDataRef persistentCertRef, cert_status_t *certStatus); | |
43 | extern const char *GetSecurityErrorString(OSStatus err); | |
44 | extern CFDataRef crypto_cssm_CopySubjectSequence(SecCertificateRef certRef); | |
45 | ||
46 | #endif /* __CRYPTO_CSSM_H__ */ | |
47 |