kmfpolicy.h revision 30a5e8fa1253cb33980ee4514743cf683f584b4e
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * CDDL HEADER START
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * The contents of this file are subject to the terms of the
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * Common Development and Distribution License (the "License").
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * You may not use this file except in compliance with the License.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * See the License for the specific language governing permissions
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * and limitations under the License.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * When distributing Covered Code, include this CDDL HEADER in each
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * If applicable, add the following below this CDDL HEADER, with the
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * fields enclosed by brackets "[]" replaced with your own identifying
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * information: Portions Copyright [yyyy] [name of copyright owner]
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * CDDL HEADER END
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllys * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * Use is subject to license terms.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#pragma ident "%Z%%M% %I% %E% SMI"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllysextern "C" {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllystypedef struct {
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * Short cut for ocsp_info and etc.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_RESPONDER_URI VAL_OCSP_BASIC.responderURI
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_URI_FROM_CERT VAL_OCSP_BASIC.uri_from_cert
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_RESP_LIFETIME VAL_OCSP_BASIC.response_lifetime
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_IGNORE_RESP_SIGN VAL_OCSP_BASIC.ignore_response_sign
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_RESP_CERT_NAME VAL_OCSP_RESP_CERT.name
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_OCSP_RESP_CERT_SERIAL VAL_OCSP_RESP_CERT.serial
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * Short cut for crl_info and etc.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_CRL_BASEFILENAME validation_info.crl_info.basefilename
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_CRL_DIRECTORY validation_info.crl_info.directory
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_CRL_GET_URI validation_info.crl_info.get_crl_uri
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_CRL_IGNORE_SIGN validation_info.crl_info.ignore_crl_sign
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define VAL_CRL_IGNORE_DATE validation_info.crl_info.ignore_crl_date
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys * Policy related constant definitions.
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_POLICY_DTD "/usr/share/lib/xml/dtd/kmfpolicy.dtd"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_DEFAULT_POLICY_FILE "/etc/security/kmfpolicy.xml"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OPTIONS_IGNORE_UNKNOWN_EKUS "ignore-unknown-eku"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OPTIONS_IGNORE_TRUST_ANCHOR "ignore-trust-anchor"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OPTIONS_VALIDITY_ADJUSTTIME "validity-adjusttime"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_VALIDATION_METHODS_ELEMENT "validation-methods"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OCSP_RESPONSE_LIFETIME_ATTR "response-lifetime"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OCSP_IGNORE_SIGN_ATTR "ignore-response-sign"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#define KMF_OCSP_RESPONDER_CERT_ELEMENT "responder-cert"
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllysextern int parsePolicyElement(xmlNodePtr, KMF_POLICY_RECORD *);
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllysextern KMF_RETURN kmf_get_policy(char *, char *, KMF_POLICY_RECORD *);
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllysextern KMF_RETURN kmf_add_policy_to_db(KMF_POLICY_RECORD *, char *, boolean_t);
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllysextern KMF_RETURN kmf_delete_policy_from_db(char *, char *);
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllysextern KMF_RETURN kmf_verify_policy(KMF_POLICY_RECORD *);
30a5e8fa1253cb33980ee4514743cf683f584b4ewyllysextern void kmf_free_policy_record(KMF_POLICY_RECORD *);
99ebb4ca412cb0a19d77a3899a87c055b9c30fa8wyllys#endif /* _KMFPOLICY_H */