pkcs11-display.h

来自「读写Smart卡加解密接口的程序」· C头文件 代码 · 共 95 行

H
95
字号
#ifndef PKCS11_DISPLAY_H#define PKCS11_DISPLAY_H/* * Copyright (C) 2003 Mathias Brossard <mathias.brossard@idealx.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, * USA */#include <stdlib.h>#include <stdio.h>#include "pkcs11.h"#ifdef __cplusplusextern "C" {#endiftypedef void (display_func) \		 (FILE *, CK_LONG, CK_VOID_PTR, CK_ULONG, CK_VOID_PTR);typedef struct {  CK_LONG type;  char *   name;} enum_specs;typedef struct {  CK_LONG type;  enum_specs *specs;  CK_ULONG    size;  char       *name;} enum_spec;typedef struct {  CK_LONG           type;  char *            name;  display_func*     display;  void *            arg;} type_spec;enum ck_type{  OBJ_T,  KEY_T,  CRT_T,  MEC_T,  USR_T,  STA_T,  RV_T};const char *lookup_enum_spec(enum_spec *spec, CK_ULONG value);const char *lookup_enum(CK_LONG type, CK_ULONG value);void print_enum    (FILE *f, CK_LONG type, CK_VOID_PTR value, CK_ULONG size, CK_VOID_PTR arg);void print_boolean (FILE *f, CK_LONG type, CK_VOID_PTR value, CK_ULONG size, CK_VOID_PTR arg);void print_generic (FILE *f, CK_LONG type, CK_VOID_PTR value, CK_ULONG size, CK_VOID_PTR arg);void print_print   (FILE *f, CK_LONG type, CK_VOID_PTR value, CK_ULONG size, CK_VOID_PTR arg);void show_error    (FILE *f, char *str, CK_RV rc);void print_ck_info(FILE *f, CK_INFO *info);void print_slot_list(FILE *f, CK_SLOT_ID_PTR pSlotList, CK_ULONG ulCount);void print_slot_info(FILE *f, CK_SLOT_INFO *info);void print_token_info(FILE *f, CK_TOKEN_INFO *info);void print_mech_list(FILE *f, CK_MECHANISM_TYPE_PTR pMechanismList,		     CK_ULONG ulMechCount);void print_mech_info(FILE *f, CK_MECHANISM_TYPE type,		     CK_MECHANISM_INFO_PTR minfo);void print_attribute_list(FILE *f, CK_ATTRIBUTE_PTR pTemplate,			  CK_ULONG  ulCount);void print_attribute_list_req(FILE *f, CK_ATTRIBUTE_PTR pTemplate,			      CK_ULONG  ulCount);void print_session_info(FILE *f, CK_SESSION_INFO *info);extern type_spec ck_attribute_specs[];extern CK_ULONG ck_attribute_num;extern enum_spec ck_types[];#ifdef __cplusplus};#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?