pam_pkcs11 0.6.8

- Main Page
- Data Structures
- Files
- Directories

- File List
- Globals

Defines | Typedefs | Functions
pkcs11_lib.h File Reference
`#include "cert_st.h"`

Go to the source code of this file.

## Defines

#define | PKCS11_EXTERN extern

## Typedefs

typedef struct cert_object_str | cert_object_t
typedef struct pkcs11_handle_str | pkcs11_handle_t

## Functions

PKCS11_EXTERN int | crypto_init (cert_policy *policy)
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 int | find_slot_by_number (pkcs11_handle_t *h, unsigned int slot_num, 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 const char * | get_slot_tokenlabel (pkcs11_handle_t *h)
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 | find_slot_by_slotlabel (pkcs11_handle_t *h, const char *wanted_slot_label, unsigned int *slot)
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_by_slotlabel (pkcs11_handle_t *h, const char *wanted_slot_label, const char *wanted_token_label, unsigned int *slot)
PKCS11_EXTERN const X509 * | get_X509_certificate (cert_object_t *cert)
PKCS11_EXTERN void | release_pkcs11_module (pkcs11_handle_t *h)
PKCS11_EXTERN int | open_pkcs11_session (pkcs11_handle_t *h, unsigned int slot)
PKCS11_EXTERN int | close_pkcs11_session (pkcs11_handle_t *h)
PKCS11_EXTERN int | pkcs11_login (pkcs11_handle_t *h, char *password)
PKCS11_EXTERN int | pkcs11_pass_login (pkcs11_handle_t *h, int nullok)
PKCS11_EXTERN int | get_slot_login_required (pkcs11_handle_t *h)
PKCS11_EXTERN int | get_slot_protected_authentication_path (pkcs11_handle_t *h)
PKCS11_EXTERN cert_object_t ** | get_certificate_list (pkcs11_handle_t *h, int *ncert)
PKCS11_EXTERN int | get_private_key (pkcs11_handle_t *h, cert_object_t *)
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 | get_random_value (unsigned char *data, int length)

## Define Documentation

#define PKCS11_EXTERN extern

Definition at line 26 of file pkcs11_lib.h.

## Typedef Documentation

typedef struct cert_object_str cert_object_t

Definition at line 22 of file pkcs11_lib.h.

typedef struct pkcs11_handle_str pkcs11_handle_t

Definition at line 23 of file pkcs11_lib.h.

## Function Documentation

PKCS11_EXTERN int close_pkcs11_session | ( | pkcs11_handle_t * | h | ) |

PKCS11_EXTERN int crypto_init | ( | cert_policy * | policy | ) |

PKCS11_EXTERN int find_slot_by_number | ( | pkcs11_handle_t * | h,
|  | unsigned int | slot_num,
|  | 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 int find_slot_by_slotlabel | ( | pkcs11_handle_t * | h,
|  | const char * | wanted_slot_label,
|  | unsigned int * | slot
| ) |  |

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 cert_object_t** get_certificate_list | ( | pkcs11_handle_t * | h,
|  | int * | ncert
| ) |  |

PKCS11_EXTERN int get_private_key | ( | pkcs11_handle_t * | h,
|  | cert_object_t * |
| ) |  |

PKCS11_EXTERN int get_random_value | ( | unsigned char * | data,
|  | int | length
| ) |  |

PKCS11_EXTERN int get_slot_login_required | ( | pkcs11_handle_t * | h | ) |

PKCS11_EXTERN int get_slot_protected_authentication_path | ( | pkcs11_handle_t * | h | ) |

PKCS11_EXTERN const char* get_slot_tokenlabel | ( | pkcs11_handle_t * | h | ) |

PKCS11_EXTERN const X509* get_X509_certificate | ( | cert_object_t * | cert | ) |

PKCS11_EXTERN int init_pkcs11_module | ( | pkcs11_handle_t * | h,
|  | int | flag
| ) |  |

PKCS11_EXTERN int load_pkcs11_module | ( | const char * | module,
|  | pkcs11_handle_t ** | h
| ) |  |

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 pkcs11_pass_login | ( | pkcs11_handle_t * | h,
|  | int | nullok
| ) |  |

PKCS11_EXTERN void release_pkcs11_module | ( | pkcs11_handle_t * | h | ) |

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 wait_for_token | ( | pkcs11_handle_t * | h,
|  | int | wanted_slot_num,
|  | const char * | wanted_token_label,
|  | unsigned int * | slot
| ) |  |

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
| ) |  |