⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pkcs11o.h

📁 IBM的Linux上的PKCS#11实现
💻 H
📖 第 1 页 / 共 2 页
字号:
             If any provision of this Agreement is invalid or             unenforceable under applicable law, it shall not affect             the validity or enforceability of the remainder of the             terms of this Agreement, and without further action by the             parties hereto, such provision shall be reformed to the             minimum extent necessary to make such provision valid and             enforceable.             If Recipient institutes patent litigation against a             Contributor with respect to a patent applicable to             software (including a cross-claim or counterclaim in a             lawsuit), then any patent licenses granted by that             Contributor to such Recipient under this Agreement shall             terminate as of the date such litigation is filed. In             addition, If Recipient institutes patent litigation             against any entity (including a cross-claim or             counterclaim in a lawsuit) alleging that the Program             itself (excluding combinations of the Program with other             software or hardware) infringes such Recipient's             patent(s), then such Recipient's rights granted under             Section 2(b) shall terminate as of the date such             litigation is filed.             All Recipient's rights under this Agreement shall             terminate if it fails to comply with any of the material             terms or conditions of this Agreement and does not cure             such failure in a reasonable period of time after becoming             aware of such noncompliance. If all Recipient's rights             under this Agreement terminate, Recipient agrees to cease             use and distribution of the Program as soon as reasonably             practicable. However, Recipient's obligations under this             Agreement and any licenses granted by Recipient relating             to the Program shall continue and survive.              Everyone is permitted to copy and distribute copies of             this Agreement, but in order to avoid inconsistency the             Agreement is copyrighted and may only be modified in the             following manner. The Agreement Steward reserves the right             to publish new versions (including revisions) of this             Agreement from time to time. No one other than the             Agreement Steward has the right to modify this Agreement.             IBM is the initial Agreement Steward. IBM may assign the             responsibility to serve as the Agreement Steward to a             suitable separate entity. Each new version of the             Agreement will be given a distinguishing version number.             The Program (including Contributions) may always be             distributed subject to the version of the Agreement under             which it was received. In addition, after a new version of             the Agreement is published, Contributor may elect to             distribute the Program (including its Contributions) under             the new version. Except as expressly stated in Sections             2(a) and 2(b) above, Recipient receives no rights or             licenses to the intellectual property of any Contributor             under this Agreement, whether expressly, by implication,             estoppel or otherwise. All rights in the Program not             expressly granted under this Agreement are reserved.             This Agreement is governed by the laws of the State of New             York and the intellectual property laws of the United             States of America. No party to this Agreement will bring a             legal action under this Agreement more than one year after             the cause of action arose. Each party waives its rights to             a jury trial in any resulting litigation. *//* (C) COPYRIGHT International Business Machines Corp. 2001          */#ifndef _PKCS11OBJECTS_H#define _PKCS11OBJECTS_H#include "pkcs11types.h"#define SC_CLASS          0x00#define SC_TOKEN          0x01#define SC_PRIVATE        0x02#define SC_MODIFIABLE     0x03#define SC_LABEL          0x04#define SC_KEY_TYPE       0x05#define SC_KEY_ID         0x06#define SC_KEY_START      0x07#define SC_KEY_END        0x08#define SC_KEY_DERIVE     0x09#define SC_KEY_LOCAL      0x10typedef union SC_OBJECT {   struct {      CK_ATTRIBUTE         class;        /* Object type                      */      CK_ATTRIBUTE         token;        /* True for token object            */      CK_ATTRIBUTE         bPrivate;     /* True for private objects         */      CK_ATTRIBUTE         bModifiable;  /* True if can be modified          */      CK_ATTRIBUTE         label;        /* Description of the object        */      CK_ATTRIBUTE         application;  /* Description of the managing app  */      CK_ATTRIBUTE         value;        /* Value of the object              */   } Data;      struct {      CK_ATTRIBUTE         class;        /* Object type                      */      CK_ATTRIBUTE         token;        /* True for token object            */      CK_ATTRIBUTE         bPrivate;     /* True for private objects         */      CK_ATTRIBUTE         bModifiable;  /* True if can be modified          */      CK_ATTRIBUTE         label;        /* Description of the object        */      CK_ATTRIBUTE         type;         /* Type of Certificate              */      CK_ATTRIBUTE         subject;     /* DER encoded subject name         */      CK_ATTRIBUTE         id;          /* Key identifier for key pair      */      CK_ATTRIBUTE         issuer;      /* DER encoded issuer name          */      CK_ATTRIBUTE         serial;      /* DER encoded serial number        */      CK_ATTRIBUTE         value;       /* BER encoding of the certificate  */   } Cert;      struct {      CK_ATTRIBUTE         class;        /* Object type                      */      CK_ATTRIBUTE         token;        /* True for token object            */      CK_ATTRIBUTE         bPrivate;     /* True for private objects         */      CK_ATTRIBUTE         bModifiable;  /* True if can be modified          */      CK_ATTRIBUTE         label;        /* Description of the object        */      CK_ATTRIBUTE         type;         /* Type of Key                      */      CK_ATTRIBUTE         id;           /* Key identifier for the key       */      CK_ATTRIBUTE         start;        /* Start date for the key           */      CK_ATTRIBUTE         end;          /* End date for the key             */      CK_ATTRIBUTE         derive;       /* TRUE: keys can be derived from   */      CK_ATTRIBUTE         local;        /* Generated locally                */      CK_ATTRIBUTE         subject;      /* DER encoded key subject name     */      CK_ATTRIBUTE         encrypt;      /* TRUE: can encrypt                */      CK_ATTRIBUTE         verify;       /* TRUE: sign is an appendix        */      CK_ATTRIBUTE         v_recover;    /* TRUE: verify where data in sign  */      CK_ATTRIBUTE         wrap;         /* TRUE: if can wrap other keys     */      CK_ATTRIBUTE         modulus;      /* Modulus n                        */      CK_ATTRIBUTE         length;       /* Length in bits of modulus n      */      CK_ATTRIBUTE         exponent;     /* Public Exponent e                */   } PubKey;      struct {      CK_ATTRIBUTE         class;        /* Object type                      */      CK_ATTRIBUTE         token;        /* True for token object            */      CK_ATTRIBUTE         bPrivate;     /* True for private objects         */      CK_ATTRIBUTE         bModifiable;  /* True if can be modified          */      CK_ATTRIBUTE         label;        /* Description of the object        */      CK_ATTRIBUTE         type;         /* Type of Key                      */      CK_ATTRIBUTE         id;           /* Key identifier for the key       */      CK_ATTRIBUTE         start;        /* Start date for the key           */      CK_ATTRIBUTE         end;          /* End date for the key             */      CK_ATTRIBUTE         derive;       /* TRUE: keys can be derived from   */      CK_ATTRIBUTE         local;        /* Generated locally                */      CK_ATTRIBUTE         subject;      /* DER encoded key subject name     */      CK_ATTRIBUTE         sensitive;    /* TRUE: key is sensitive           */      CK_ATTRIBUTE         decrypt;      /* TRUE: can decrypt                */      CK_ATTRIBUTE         sign;         /* TRUE: sign as an appendix        */      CK_ATTRIBUTE         s_recover;    /* TRUE: verify where data in sign  */      CK_ATTRIBUTE         unwrap;       /* TRUE: if can unwrap other keys   */      CK_ATTRIBUTE         extractable;  /* TRUE: can be extracted           */      CK_ATTRIBUTE         always_sens;  /* TRUE: if sensitive always been T */      CK_ATTRIBUTE         never_extract;/* TRUE: if extractable never set T */      CK_ATTRIBUTE         modulus;     /* Modulus n                        */      CK_ATTRIBUTE         pub_exp;     /* Public Exponent e                */      CK_ATTRIBUTE         priv_exp;    /* Public Exponent d                */      CK_ATTRIBUTE         prime1;      /* Prime p                          */      CK_ATTRIBUTE         prime2;      /* Prime q                          */      CK_ATTRIBUTE         exp1;        /* Private Exponent d modulo p-1    */      CK_ATTRIBUTE         exp2;        /* Private Exponent d modulo q-1    */      CK_ATTRIBUTE         coefficient; /* CRT coefficient q^(-1) mod p     */   } PrivKey;   struct {      CK_ATTRIBUTE         class;        /* Object type                      */      CK_ATTRIBUTE         token;        /* True for token object            */      CK_ATTRIBUTE         bPrivate;     /* True for private objects         */      CK_ATTRIBUTE         bModifiable;  /* True if can be modified          */      CK_ATTRIBUTE         label;        /* Description of the object        */      CK_ATTRIBUTE         type;         /* Type of Key                      */      CK_ATTRIBUTE         id;           /* Key identifier for the key       */      CK_ATTRIBUTE         start;        /* Start date for the key           */      CK_ATTRIBUTE         end;          /* End date for the key             */      CK_ATTRIBUTE         derive;       /* TRUE: keys can be derived from   */      CK_ATTRIBUTE         local;        /* Generated locally                */      CK_ATTRIBUTE         sensitive;    /* TRUE: key is sensitive           */      CK_ATTRIBUTE         encrypt;      /* TRUE: can encrypt                */      CK_ATTRIBUTE         decrypt;      /* TRUE: can decrypt                */      CK_ATTRIBUTE         sign;         /* TRUE: sign as an appendix        */      CK_ATTRIBUTE         verify;       /* TRUE: sign is an appendix        */      CK_ATTRIBUTE         wrap;         /* TRUE: if can wrap other keys     */      CK_ATTRIBUTE         unwrap;       /* TRUE: if can unwrap other keys   */      CK_ATTRIBUTE         extractable;  /* TRUE: can be extracted           */      CK_ATTRIBUTE         always_sens;  /* TRUE: if sensitive always been T */      CK_ATTRIBUTE         never_extract;/* TRUE: if extractable never set T */      CK_ATTRIBUTE         value;        /* Key value                        */      CK_ATTRIBUTE         len;          /* Length in bytes of key           */   } SecretKey;   CK_ATTRIBUTE         generic[28];  // PrivKey is the largest structure with 28 Attributes} SC_OBJECT;typedef SC_OBJECT         * SC_OBJECT_PTR;typedef struct SC_SESSION_HANDLE * SC_SESSION_HANDLE_PTR;typedef struct SC_OBJECT_HANDLE  * SC_OBJECT_HANDLE_PTR;typedef struct SC_SESSION_HANDLE {   CK_SESSION_HANDLE     session;   SC_SESSION_HANDLE_PTR next;} SC_SESSION_HANDLE;typedef struct SC_OBJECT_HANDLE {   CK_OBJECT_HANDLE     object;   SC_OBJECT_HANDLE_PTR next;} SC_OBJECT_HANDLE;#endif

⌨️ 快捷键说明

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