]> git.saurik.com Git - apple/ipsec.git/blame - ipsec-tools/racoon/crypto_cssm.h
ipsec-258.100.1.tar.gz
[apple/ipsec.git] / ipsec-tools / racoon / crypto_cssm.h
CommitLineData
52b7d2ce
A
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"
d1e348cf 33#include <CoreFoundation/CoreFoundation.h>
e8d9021d
A
34#include <Security/SecBase.h>
35
85f41bec 36
e8d9021d 37extern int crypto_cssm_check_x509cert (cert_t *hostcert, cert_t *certchain, CFStringRef hostname, SecKeyRef *publicKeyRef);
65c25746
A
38extern int crypto_cssm_verify_x509sign(SecKeyRef publicKeyRef, vchar_t *hash, vchar_t *signature, Boolean useSHA1);
39extern SecCertificateRef crypto_cssm_x509cert_CreateSecCertificateRef (vchar_t *cert);
52b7d2ce 40extern vchar_t* crypto_cssm_getsign(CFDataRef persistentCertRef, vchar_t* hash);
fce29cd9 41extern vchar_t* crypto_cssm_get_x509cert(CFDataRef persistentCertRef, cert_status_t *certStatus);
e8d9021d 42extern const char *GetSecurityErrorString(OSStatus err);
65c25746 43extern CFDataRef crypto_cssm_CopySubjectSequence(SecCertificateRef certRef);
52b7d2ce
A
44
45#endif /* __CRYPTO_CSSM_H__ */
46