OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs
cswift.h File Reference

Go to the source code of this file.

Classes

struct  _SW_U64
 
struct  _SW_LARGENUMBER
 
struct  _SW_CRT
 
struct  _SW_EXP
 
struct  _SW_DSA
 
struct  _SW_NVDATA
 
struct  _SW_PARAM
 

Macros

#define SW_OK   (0L)
 
#define SW_ERR_BASE   (-10000L)
 
#define SW_ERR_NO_CARD   (SW_ERR_BASE-1) /* The Card is not present */
 
#define SW_ERR_CARD_NOT_READY   (SW_ERR_BASE-2) /* The card has not powered */
 
#define SW_ERR_TIME_OUT   (SW_ERR_BASE-3) /* Execution of a command */
 
#define SW_ERR_NO_EXECUTE   (SW_ERR_BASE-4) /* The Card failed to */
 
#define SW_ERR_INPUT_NULL_PTR   (SW_ERR_BASE-5) /* a required pointer is */
 
#define SW_ERR_INPUT_SIZE   (SW_ERR_BASE-6) /* size is invalid, too */
 
#define SW_ERR_INVALID_HANDLE   (SW_ERR_BASE-7) /* Invalid SW_ACC_CONTEXT */
 
#define SW_ERR_PENDING   (SW_ERR_BASE-8) /* A request is already out- */
 
#define SW_ERR_AVAILABLE   (SW_ERR_BASE-9) /* A result is available. */
 
#define SW_ERR_NO_PENDING   (SW_ERR_BASE-10)/* No request is pending. */
 
#define SW_ERR_NO_MEMORY   (SW_ERR_BASE-11)/* Not enough memory */
 
#define SW_ERR_BAD_ALGORITHM   (SW_ERR_BASE-12)/* Invalid algorithm type */
 
#define SW_ERR_MISSING_KEY   (SW_ERR_BASE-13)/* No key is associated with */
 
#define SW_ERR_KEY_CMD_MISMATCH   (SW_ERR_BASE-14)/* Cannot perform requested */
 
#define SW_ERR_NOT_IMPLEMENTED   (SW_ERR_BASE-15)/* Not implemented */
 
#define SW_ERR_BAD_COMMAND   (SW_ERR_BASE-16)/* Bad command code */
 
#define SW_ERR_BAD_ITEM_SIZE   (SW_ERR_BASE-17)/* too small or too large in */
 
#define SW_ERR_BAD_ACCNUM   (SW_ERR_BASE-18)/* Bad accelerator number */
 
#define SW_ERR_SELFTEST_FAIL   (SW_ERR_BASE-19)/* At least one of the self */
 
#define SW_ERR_MISALIGN   (SW_ERR_BASE-20)/* Certain alogrithms require*/
 
#define SW_ERR_OUTPUT_NULL_PTR   (SW_ERR_BASE-21)/* a required pointer is */
 
#define SW_ERR_OUTPUT_SIZE   (SW_ERR_BASE-22)/* size is invalid, too */
 
#define SW_ERR_FIRMWARE_CHECKSUM   (SW_ERR_BASE-23)/* firmware checksum mismatch*/
 
#define SW_ERR_UNKNOWN_FIRMWARE   (SW_ERR_BASE-24)/* unknown firmware error */
 
#define SW_ERR_INTERRUPT   (SW_ERR_BASE-25)/* request is abort when */
 
#define SW_ERR_NVWRITE_FAIL   (SW_ERR_BASE-26)/* error in writing to Non- */
 
#define SW_ERR_NVWRITE_RANGE   (SW_ERR_BASE-27)/* out of range error in */
 
#define SW_ERR_RNG_ERROR   (SW_ERR_BASE-28)/* Random Number Generation */
 
#define SW_ERR_DSS_FAILURE   (SW_ERR_BASE-29)/* DSS Sign or Verify failure*/
 
#define SW_ERR_MODEXP_FAILURE   (SW_ERR_BASE-30)/* Failure in various math */
 
#define SW_ERR_ONBOARD_MEMORY   (SW_ERR_BASE-31)/* Error in accessing on - */
 
#define SW_ERR_FIRMWARE_VERSION   (SW_ERR_BASE-32)/* Wrong version in firmware */
 
#define SW_ERR_ZERO_WORKING_ACCELERATOR   (SW_ERR_BASE-44)/* All accelerators are bad */
 
#define SW_ALG_CRT   1
 
#define SW_ALG_EXP   2
 
#define SW_ALG_DSA   3
 
#define SW_ALG_NVDATA   4
 
#define SW_CMD_MODEXP_CRT   1 /* perform Modular Exponentiation using */
 
#define SW_CMD_MODEXP   2 /* perform Modular Exponentiation */
 
#define SW_CMD_DSS_SIGN   3 /* perform DSS sign */
 
#define SW_CMD_DSS_VERIFY   4 /* perform DSS verify */
 
#define SW_CMD_RAND   5 /* perform random number generation */
 
#define SW_CMD_NVREAD   6 /* perform read to nonvolatile RAM */
 
#define SW_CMD_NVWRITE   7 /* perform write to nonvolatile RAM */
 
#define SW_OS_INVALID_HANDLE   (-1)
 
#define SW_CALLCONV
 

Typedefs

typedef long SW_STATUS
 
typedef unsigned char SW_BYTE
 
typedef unsigned short SW_U16
 
typedef unsigned long SW_U32
 
typedef struct _SW_U64 SW_U64
 
typedef SW_U32 SW_ALGTYPE
 
typedef SW_U32 SW_STATE
 
typedef SW_U32 SW_COMMAND_CODE
 
typedef SW_U32 SW_COMMAND_BITMAP [4]
 
typedef struct _SW_LARGENUMBER SW_LARGENUMBER
 
typedef int SW_OSHANDLE
 
typedef struct _SW_CRT SW_CRT
 
typedef struct _SW_EXP SW_EXP
 
typedef struct _SW_DSA SW_DSA
 
typedef struct _SW_NVDATA SW_NVDATA
 
typedef struct _SW_PARAM SW_PARAM
 
typedef SW_U32 SW_CONTEXT_HANDLE
 
typedef SW_STATUS SW_CALLCONV t_swAcquireAccContext (SW_CONTEXT_HANDLE *hac)
 
typedef SW_STATUS SW_CALLCONV t_swAttachKeyParam (SW_CONTEXT_HANDLE hac, SW_PARAM *key_params)
 
typedef SW_STATUS SW_CALLCONV t_swSimpleRequest (SW_CONTEXT_HANDLE hac, SW_COMMAND_CODE cmd, SW_LARGENUMBER pin[], SW_U32 pin_count, SW_LARGENUMBER pout[], SW_U32 pout_count)
 
typedef SW_STATUS SW_CALLCONV t_swReleaseAccContext (SW_CONTEXT_HANDLE hac)
 

Macro Definition Documentation

#define SW_ALG_CRT   1

Definition at line 133 of file cswift.h.

#define SW_ALG_DSA   3

Definition at line 135 of file cswift.h.

#define SW_ALG_EXP   2

Definition at line 134 of file cswift.h.

#define SW_ALG_NVDATA   4

Definition at line 136 of file cswift.h.

#define SW_CALLCONV

Definition at line 177 of file cswift.h.

#define SW_CMD_DSS_SIGN   3 /* perform DSS sign */

Definition at line 142 of file cswift.h.

#define SW_CMD_DSS_VERIFY   4 /* perform DSS verify */

Definition at line 143 of file cswift.h.

#define SW_CMD_MODEXP   2 /* perform Modular Exponentiation */

Definition at line 141 of file cswift.h.

#define SW_CMD_MODEXP_CRT   1 /* perform Modular Exponentiation using */

Definition at line 139 of file cswift.h.

#define SW_CMD_NVREAD   6 /* perform read to nonvolatile RAM */

Definition at line 145 of file cswift.h.

#define SW_CMD_NVWRITE   7 /* perform write to nonvolatile RAM */

Definition at line 146 of file cswift.h.

#define SW_CMD_RAND   5 /* perform random number generation */

Definition at line 144 of file cswift.h.

#define SW_ERR_AVAILABLE   (SW_ERR_BASE-9) /* A result is available. */

Definition at line 68 of file cswift.h.

#define SW_ERR_BAD_ACCNUM   (SW_ERR_BASE-18)/* Bad accelerator number */

Definition at line 90 of file cswift.h.

#define SW_ERR_BAD_ALGORITHM   (SW_ERR_BASE-12)/* Invalid algorithm type */

Definition at line 71 of file cswift.h.

#define SW_ERR_BAD_COMMAND   (SW_ERR_BASE-16)/* Bad command code */

Definition at line 86 of file cswift.h.

#define SW_ERR_BAD_ITEM_SIZE   (SW_ERR_BASE-17)/* too small or too large in */

Definition at line 87 of file cswift.h.

#define SW_ERR_BASE   (-10000L)

Definition at line 51 of file cswift.h.

#define SW_ERR_CARD_NOT_READY   (SW_ERR_BASE-2) /* The card has not powered */

Definition at line 53 of file cswift.h.

#define SW_ERR_DSS_FAILURE   (SW_ERR_BASE-29)/* DSS Sign or Verify failure*/

Definition at line 120 of file cswift.h.

#define SW_ERR_FIRMWARE_CHECKSUM   (SW_ERR_BASE-23)/* firmware checksum mismatch*/

Definition at line 106 of file cswift.h.

#define SW_ERR_FIRMWARE_VERSION   (SW_ERR_BASE-32)/* Wrong version in firmware */

Definition at line 125 of file cswift.h.

#define SW_ERR_INPUT_NULL_PTR   (SW_ERR_BASE-5) /* a required pointer is */

Definition at line 59 of file cswift.h.

#define SW_ERR_INPUT_SIZE   (SW_ERR_BASE-6) /* size is invalid, too */

Definition at line 61 of file cswift.h.

#define SW_ERR_INTERRUPT   (SW_ERR_BASE-25)/* request is abort when */

Definition at line 111 of file cswift.h.

#define SW_ERR_INVALID_HANDLE   (SW_ERR_BASE-7) /* Invalid SW_ACC_CONTEXT */

Definition at line 63 of file cswift.h.

#define SW_ERR_KEY_CMD_MISMATCH   (SW_ERR_BASE-14)/* Cannot perform requested */

Definition at line 77 of file cswift.h.

#define SW_ERR_MISALIGN   (SW_ERR_BASE-20)/* Certain alogrithms require*/

Definition at line 96 of file cswift.h.

#define SW_ERR_MISSING_KEY   (SW_ERR_BASE-13)/* No key is associated with */

Definition at line 73 of file cswift.h.

#define SW_ERR_MODEXP_FAILURE   (SW_ERR_BASE-30)/* Failure in various math */

Definition at line 121 of file cswift.h.

#define SW_ERR_NO_CARD   (SW_ERR_BASE-1) /* The Card is not present */

Definition at line 52 of file cswift.h.

#define SW_ERR_NO_EXECUTE   (SW_ERR_BASE-4) /* The Card failed to */

Definition at line 57 of file cswift.h.

#define SW_ERR_NO_MEMORY   (SW_ERR_BASE-11)/* Not enough memory */

Definition at line 70 of file cswift.h.

#define SW_ERR_NO_PENDING   (SW_ERR_BASE-10)/* No request is pending. */

Definition at line 69 of file cswift.h.

#define SW_ERR_NOT_IMPLEMENTED   (SW_ERR_BASE-15)/* Not implemented */

Definition at line 84 of file cswift.h.

#define SW_ERR_NVWRITE_FAIL   (SW_ERR_BASE-26)/* error in writing to Non- */

Definition at line 114 of file cswift.h.

#define SW_ERR_NVWRITE_RANGE   (SW_ERR_BASE-27)/* out of range error in */

Definition at line 116 of file cswift.h.

#define SW_ERR_ONBOARD_MEMORY   (SW_ERR_BASE-31)/* Error in accessing on - */

Definition at line 123 of file cswift.h.

#define SW_ERR_OUTPUT_NULL_PTR   (SW_ERR_BASE-21)/* a required pointer is */

Definition at line 100 of file cswift.h.

#define SW_ERR_OUTPUT_SIZE   (SW_ERR_BASE-22)/* size is invalid, too */

Definition at line 103 of file cswift.h.

#define SW_ERR_PENDING   (SW_ERR_BASE-8) /* A request is already out- */

Definition at line 65 of file cswift.h.

#define SW_ERR_RNG_ERROR   (SW_ERR_BASE-28)/* Random Number Generation */

Definition at line 118 of file cswift.h.

#define SW_ERR_SELFTEST_FAIL   (SW_ERR_BASE-19)/* At least one of the self */

Definition at line 91 of file cswift.h.

#define SW_ERR_TIME_OUT   (SW_ERR_BASE-3) /* Execution of a command */

Definition at line 55 of file cswift.h.

#define SW_ERR_UNKNOWN_FIRMWARE   (SW_ERR_BASE-24)/* unknown firmware error */

Definition at line 109 of file cswift.h.

#define SW_ERR_ZERO_WORKING_ACCELERATOR   (SW_ERR_BASE-44)/* All accelerators are bad */

Definition at line 128 of file cswift.h.

#define SW_OK   (0L)

Definition at line 50 of file cswift.h.

#define SW_OS_INVALID_HANDLE   (-1)

Definition at line 176 of file cswift.h.

Typedef Documentation

typedef SW_U32 SW_ALGTYPE

Definition at line 148 of file cswift.h.

typedef unsigned char SW_BYTE

Definition at line 26 of file cswift.h.

typedef SW_U32 SW_COMMAND_BITMAP[4]

Definition at line 151 of file cswift.h.

Definition at line 150 of file cswift.h.

Definition at line 215 of file cswift.h.

typedef struct _SW_CRT SW_CRT
typedef struct _SW_DSA SW_DSA
typedef struct _SW_EXP SW_EXP
typedef struct _SW_NVDATA SW_NVDATA
typedef int SW_OSHANDLE

Definition at line 175 of file cswift.h.

typedef struct _SW_PARAM SW_PARAM
typedef SW_U32 SW_STATE

Definition at line 149 of file cswift.h.

typedef long SW_STATUS

Definition at line 25 of file cswift.h.

typedef unsigned short SW_U16

Definition at line 27 of file cswift.h.

typedef unsigned long SW_U32

Definition at line 32 of file cswift.h.

typedef struct _SW_U64 SW_U64
typedef SW_STATUS SW_CALLCONV t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac)

Definition at line 220 of file cswift.h.

typedef SW_STATUS SW_CALLCONV t_swAttachKeyParam(SW_CONTEXT_HANDLE hac, SW_PARAM *key_params)

Definition at line 221 of file cswift.h.

typedef SW_STATUS SW_CALLCONV t_swReleaseAccContext(SW_CONTEXT_HANDLE hac)

Definition at line 229 of file cswift.h.

typedef SW_STATUS SW_CALLCONV t_swSimpleRequest(SW_CONTEXT_HANDLE hac, SW_COMMAND_CODE cmd, SW_LARGENUMBER pin[], SW_U32 pin_count, SW_LARGENUMBER pout[], SW_U32 pout_count)

Definition at line 223 of file cswift.h.