pam_pkcs11 0.6.8

- Main Page
- Data Structures
- Files
- Directories

- File List
- Globals

cert_vfy.h
Go to the documentation of this file.

    00001 /*
    00002  * PKCS #11 PAM Login Module
    00003  * Copyright (C) 2003 Mario Strasser <mast@gmx.net>,
    00004  *
    00005  * This library is free software; you can redistribute it and/or
    00006  * modify it under the terms of the GNU Lesser General Public
    00007  * License as published by the Free Software Foundation; either
    00008  * version 2.1 of the License, or (at your option) any later version.
    00009  *
    00010  * This library is distributed in the hope that it will be useful,
    00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013  * Lesser General Public License for more details.
    00014  *
    00015  * $Id: cert_vfy.h 403 2010-04-07 13:25:49Z ludovic.rousseau $
    00016  */
    00017
    00027 #ifndef __CERT_VFY_H_
    00028 #define __CERT_VFY_H_
    00029
    00030 #include "cert_st.h"
    00031
    00032 typedef enum {
    00034         CRLP_NONE,
    00036         CRLP_ONLINE,
    00038         CRLP_OFFLINE,
    00040         CRLP_AUTO
    00041         } crl_policy_t;
    00042
    00043 typedef enum {
    00044         OCSP_NONE,
    00045         OCSP_ON
    00046         } ocsp_policy_t;
    00047
    00048 struct cert_policy_st {
    00049         int ca_policy;
    00050         int crl_policy;
    00051         int signature_policy;
    00052         const char *ca_dir;
    00053         const char *crl_dir;
    00054         const char *nss_dir;
    00055         int ocsp_policy;
    00056 };
    00057
    00058 #ifndef __CERT_VFY_C
    00059 #define CERTVFY_EXTERN extern
    00060 #else
    00061 #define CERTVFY_EXTERN
    00062 #endif
    00063
    00070 CERTVFY_EXTERN int verify_certificate(X509 * x509, cert_policy *policy);
    00071
    00081 CERTVFY_EXTERN int verify_signature(X509 * x509, unsigned char *data, int data_length, unsigned char *signature, int signature_length);
    00082
    00083 #undef CERTVFY_EXTERN
    00084
    00085 #endif /* __CERT_VFY_H_ */