components/openssl/openssl-1.0.1-fips-140/engines/pkcs11/e_pk11.h
changeset 1692 dce38b815f7d
parent 1604 b6e3e1ed52a5
equal deleted inserted replaced
1691:043f53535ed4 1692:dce38b815f7d
     1 /*
     1 /*
     2  * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
     3  *
       
     4  */
     3  */
     5 
     4 
     6 /* crypto/engine/e_pk11.h */
     5 /* crypto/engine/e_pk11.h */
     7 /*
     6 /*
     8  * This product includes software developed by the OpenSSL Project for
     7  * This product includes software developed by the OpenSSL Project for
    69 #ifndef	E_PK11_H
    68 #ifndef	E_PK11_H
    70 #define	E_PK11_H
    69 #define	E_PK11_H
    71 
    70 
    72 #include "e_pk11_err.h"
    71 #include "e_pk11_err.h"
    73 
    72 
    74 /* max byte length of a symetric key we support */
    73 #ifdef	__cplusplus
       
    74 extern "C" {
       
    75 #endif
       
    76 
       
    77 /* max byte length of a symmetric key we support */
    75 #define	PK11_KEY_LEN_MAX			32
    78 #define	PK11_KEY_LEN_MAX			32
    76 
    79 
    77 /*
    80 /*
    78  * This structure encapsulates all reusable information for a PKCS#11
    81  * This structure encapsulates all reusable information for a PKCS#11
    79  * session. A list of these objects is created on behalf of the
    82  * session. A list of these objects is created on behalf of the
   170  * For every group a different slot can be chosen. That means that we must have
   173  * For every group a different slot can be chosen. That means that we must have
   171  * at least 3 different lists of cached PKCS#11 sessions since sessions from
   174  * at least 3 different lists of cached PKCS#11 sessions since sessions from
   172  * different groups may be initialized in different slots.
   175  * different groups may be initialized in different slots.
   173  *
   176  *
   174  * To provide locking granularity in multithreaded environment, the groups are
   177  * To provide locking granularity in multithreaded environment, the groups are
   175  * further splitted into types with each type having a separate session cache.
   178  * further split into types with each type having a separate session cache.
   176  */
   179  */
   177 typedef enum PK11_OPTYPE_ENUM
   180 typedef enum PK11_OPTYPE_ENUM
   178 	{
   181 	{
   179 	OP_RAND,
   182 	OP_RAND,
   180 	OP_RSA,
   183 	OP_RSA,
   241 extern int pk11_destroy_dh_key_objects(PK11_SESSION *session);
   244 extern int pk11_destroy_dh_key_objects(PK11_SESSION *session);
   242 extern int pk11_destroy_dh_object(PK11_SESSION *sp, CK_BBOOL uselock);
   245 extern int pk11_destroy_dh_object(PK11_SESSION *sp, CK_BBOOL uselock);
   243 extern DH_METHOD *PK11_DH(void);
   246 extern DH_METHOD *PK11_DH(void);
   244 #endif /* OPENSSL_NO_DH */
   247 #endif /* OPENSSL_NO_DH */
   245 
   248 
       
   249 extern int pk11_engine_pkey_methods(ENGINE *e, EVP_PKEY_METHOD **pmeth,
       
   250     const int **nids, int nid);
       
   251 
   246 extern CK_FUNCTION_LIST_PTR pFuncList;
   252 extern CK_FUNCTION_LIST_PTR pFuncList;
   247 
   253 
       
   254 #ifdef	__cplusplus
       
   255 }
       
   256 #endif
   248 #endif /* E_PK11_H */
   257 #endif /* E_PK11_H */