pam_pkcs11  0.6.9
pkcs11_lib.h
Go to the documentation of this file.
1 /*
2  * PKCS #11 PAM Login Module
3  * Copyright (C) 2003 Mario Strasser <mast@gmx.net>,
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * $Id$
16  */
17 #ifndef __PKCS11_LIB_H__
18 #define __PKCS11_LIB_H__
19 
20 #include "cert_st.h"
21 
22 typedef struct cert_object_str cert_object_t;
23 typedef struct pkcs11_handle_str pkcs11_handle_t;
24 
25 #ifndef __PKCS11_LIB_C__
26 #define PKCS11_EXTERN extern
27 #else
28 #define PKCS11_EXTERN
29 #endif
30 
32 PKCS11_EXTERN int load_pkcs11_module(const char *module, pkcs11_handle_t **h);
34 PKCS11_EXTERN int find_slot_by_number(pkcs11_handle_t *h,unsigned int slot_num,
35  unsigned int *slot);
37  int slot_num, const char *slot_label,
38  unsigned int *slot);
41  int wanted_slot_num,
42  const char *wanted_token_label,
43  unsigned int *slot);
45  const char *wanted_slot_label,
46  unsigned int *slot);
48  const char *wanted_slot_label,
49  const char *wanted_token_label,
50  unsigned int *slot);
52  const char *wanted_slot_label,
53  const char *wanted_token_label,
54  unsigned int *slot);
57 PKCS11_EXTERN int open_pkcs11_session(pkcs11_handle_t *h, unsigned int slot);
59 PKCS11_EXTERN int pkcs11_login(pkcs11_handle_t *h, char *password);
64  int *ncert);
67  unsigned char *data, unsigned long length,
68  unsigned char **signature, unsigned long *signature_length);
69 PKCS11_EXTERN int get_random_value(unsigned char *data, int length);
70 PKCS11_EXTERN void cleanse(void *ptr, size_t len);
71 
72 #undef PKCS11_EXTERN
73 
74 /* end of pkcs11_lib.h */
75 #endif
struct cert_object_str cert_object_t
Definition: pkcs11_lib.h:22
PKCS11_EXTERN int find_slot_by_number(pkcs11_handle_t *h, unsigned int slot_num, unsigned int *slot)
security library failure security security library has experienced an input length error security security Improperly formatted time string Peer s certificate has an invalid signature Peer s Certificate has been revoked Peer s public key is invalid New password entered incorrectly Please try again security security Peer s certificate issuer has been marked as not trusted by the user Certificate already exists in your database Error adding certificate to database The private key for this certificate cannot be found in key database This certificate is not valid The certificate issuer s certificate has expired Check your system date and time The CRL for the certificate s issuer has an invalid signature Certificate extension value is invalid Issuer certificate is invalid Certificate usages field is invalid The key does not support the requested operation New CRL is not later than the current one Not Cannot or matching certificate and private key not found Signature verification too many signers or improper or corrupted data Cannot Fortezza card has not been properly initialized Please remove it and return it to your issuer No Fortezza card selected Personality not found Invalid Pin No KRL for this site s certificate has been found The KRL for this site s certificate has an invalid signature New KRL has an invalid format security The security card or token does not needs to be or has been removed No slot or token was selected A key with the same nickname already exists error while creating baggage object Couldn t delete the privilege Required algorithm is not allowed Error attempting to import certificates Unable to import Invalid MAC Incorrect password or corrupt file Unable to import Only password integrity and privacy modes supported Unable to import Encryption algorithm not supported Unable to import Incorrect privacy password The user pressed cancel Message not sent Certificate type not approved for application Unable to import Error attempting to import private key Unable to export Unable to locate certificate or key by nickname Unable to export Unable to write the export file Unable to export Key database corrupt or deleted Password entered is invalid Please pick a different one Certificate nickname already in use A sensitive key cannot be moved to the slot where it is needed Invalid module path filename Unable to delete module New CKL has different issuer than current CKL Delete current CKL The key revocation list for this certificate is not yet valid The requested certificate could not be found The location for the certificate status server has invalid format The OCSP server returned unexpected invalid HTTP data The OCSP server experienced an internal error The OCSP server requires a signature on this request The OCSP server returned an unrecognizable status You must enable OCSP before performing this operation The response from the OCSP server was corrupted or improperly formed The OCSP response is not yet The OCSP response contains out of date information The CMS or PKCS Could not decode ASN data Specified template was invalid You are attempting to import a cert with the same issuer serial as an existing cert
Definition: SECerrs.h:462
PKCS11_EXTERN int get_slot_login_required(pkcs11_handle_t *h)
PKCS11_EXTERN int crypto_init(cert_policy *policy)
PKCS11_EXTERN const X509 * get_X509_certificate(cert_object_t *cert)
PKCS11_EXTERN int get_random_value(unsigned char *data, int length)
PKCS11_EXTERN int find_slot_by_slotlabel_and_tokenlabel(pkcs11_handle_t *h, const char *wanted_slot_label, const char *wanted_token_label, unsigned int *slot)
PKCS11_EXTERN int wait_for_token(pkcs11_handle_t *h, int wanted_slot_num, const char *wanted_token_label, unsigned int *slot)
PKCS11_EXTERN int get_private_key(pkcs11_handle_t *h, cert_object_t *)
PKCS11_EXTERN int get_slot_protected_authentication_path(pkcs11_handle_t *h)
struct pkcs11_handle_str pkcs11_handle_t
Definition: pkcs11_lib.h:23
PKCS11_EXTERN int wait_for_token_by_slotlabel(pkcs11_handle_t *h, const char *wanted_slot_label, const char *wanted_token_label, unsigned int *slot)
PKCS11_EXTERN int find_slot_by_slotlabel(pkcs11_handle_t *h, const char *wanted_slot_label, unsigned int *slot)
PKCS11_EXTERN int find_slot_by_number_and_label(pkcs11_handle_t *h, int slot_num, const char *slot_label, unsigned int *slot)
PKCS11_EXTERN void cleanse(void *ptr, size_t len)
PKCS11_EXTERN int close_pkcs11_session(pkcs11_handle_t *h)
PKCS11_EXTERN cert_object_t ** get_certificate_list(pkcs11_handle_t *h, int *ncert)
PKCS11_EXTERN void release_pkcs11_module(pkcs11_handle_t *h)
PKCS11_EXTERN int pkcs11_pass_login(pkcs11_handle_t *h, int nullok)
PKCS11_EXTERN int sign_value(pkcs11_handle_t *h, cert_object_t *, unsigned char *data, unsigned long length, unsigned char **signature, unsigned long *signature_length)
PKCS11_EXTERN int open_pkcs11_session(pkcs11_handle_t *h, unsigned int slot)
PKCS11_EXTERN int pkcs11_login(pkcs11_handle_t *h, char *password)
PKCS11_EXTERN int load_pkcs11_module(const char *module, pkcs11_handle_t **h)
PKCS11_EXTERN int init_pkcs11_module(pkcs11_handle_t *h, int flag)
PKCS11_EXTERN const char * get_slot_tokenlabel(pkcs11_handle_t *h)
#define PKCS11_EXTERN
Definition: pkcs11_lib.h:26