]> git.saurik.com Git - apple/security.git/blob - OSX/sec/securityd/SecRevocationServer.h
255f1f78c78cbe81b7b05fab59f9afc2472bceda
[apple/security.git] / OSX / sec / securityd / SecRevocationServer.h
1 /*
2 * Copyright (c) 2017-2018 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The 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, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /*!
25 @header SecRevocationServer
26 The functions provided in SecRevocationServer.h provide an interface to
27 the trust evaluation engine for dealing with certificate revocation.
28 */
29
30 #ifndef _SECURITY_SECREVOCATIONSERVER_H_
31 #define _SECURITY_SECREVOCATIONSERVER_H_
32
33 #include <securityd/SecTrustServer.h>
34 #include <securityd/SecRevocationDb.h>
35
36 typedef struct OpaqueSecORVC *SecORVCRef;
37 #if ENABLE_CRLS
38 typedef struct OpaqueSecCRVC *SecCRVCRef;
39 #endif
40
41 /* Revocation verification context. */
42 struct OpaqueSecRVC {
43 /* Pointer to the builder for this revocation check */
44 SecPathBuilderRef builder;
45
46 /* Index of cert in pvc that this RVC is for 0 = leaf, etc. */
47 CFIndex certIX;
48
49 /* The OCSP Revocation verification context */
50 SecORVCRef orvc;
51
52 #if ENABLE_CRLS
53 SecCRVCRef crvc;
54 #endif
55
56 /* Valid database info for this revocation check */
57 SecValidInfoRef valid_info;
58
59 bool done;
60 };
61 typedef struct OpaqueSecRVC *SecRVCRef;
62
63 bool SecPathBuilderCheckRevocation(SecPathBuilderRef builder);
64 CFAbsoluteTime SecRVCGetEarliestNextUpdate(SecRVCRef rvc);
65 void SecRVCDelete(SecRVCRef rvc);
66 bool SecRVCHasDefinitiveValidInfo(SecRVCRef rvc);
67 bool SecRVCHasRevokedValidInfo(SecRVCRef rvc);
68 void SecRVCSetRevokedResult(SecRVCRef rvc);
69
70
71 #endif /* _SECURITY_SECREVOCATIONSERVER_H_ */