[pkg-opensc-commit] [libp11] 94/239: update to latest pkcs11.h revision.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit aed99ee5998c7b8e59d898edb2d932bf3217db84
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Mon Dec 18 07:40:50 2006 +0000

    update to latest pkcs11.h revision.
---
 src/libp11-int.h |  1 -
 src/pkcs11.h     | 34 ++++++++++++++++++++++------------
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/src/libp11-int.h b/src/libp11-int.h
index 3451ebb..9d7e60a 100644
--- a/src/libp11-int.h
+++ b/src/libp11-int.h
@@ -24,7 +24,6 @@
 #include <openssl/x509.h>
 
 #define CRYPTOKI_EXPORTS
-#define CRYPTOKI_COMPAT
 #include <pkcs11.h>
 
 extern void *C_LoadModule(const char *name, CK_FUNCTION_LIST_PTR_PTR);
diff --git a/src/pkcs11.h b/src/pkcs11.h
index e61756f..115c309 100644
--- a/src/pkcs11.h
+++ b/src/pkcs11.h
@@ -16,10 +16,18 @@
    they can be picked up by other projects from there as well.  */
 
 /* This file is a modified implementation of the PKCS #11 standard by
-   RSA Security Inc.  The goal is ABI compatibility to the PKCS #11
-   standard on the one hand and conformance to the GNU coding standard
-   in the API on the other hand.  For this, the following changes are
-   made to the specification:
+   RSA Security Inc.  It is mostly a drop-in replacement, with the
+   following change:
+
+   This header file does not require any macro definitions by the user
+   (like CK_DEFINE_FUNCTION etc).  In fact, it defines those macros
+   for you (if useful, some are missing, let me know if you need
+   more).
+
+   There is an additional API available that does comply better to the
+   GNU coding standard.  It can be switched on by defining
+   CRYPTOKI_GNU before including this header file.  For this, the
+   following changes are made to the specification:
 
    All structure types are changed to a "struct ck_foo" where CK_FOO
    is the type name in PKCS #11.
@@ -35,10 +43,8 @@
    Note that function names are still in the original case, as they
    need for ABI compatibility.
 
-   CK_FALSE, CK_TRUE and NULL_PTR are removed without substitute.
-
-   This header file does not require any macro definitions by the
-   user.
+   CK_FALSE, CK_TRUE and NULL_PTR are removed without substitute.  Use
+   <stdbool.h>.
 
    If CRYPTOKI_COMPAT is defined before including this header file,
    then none of the API changes above take place, and the API is the
@@ -59,12 +65,16 @@ extern "C" {
    versions).  */
 #define CRYPTOKI_VERSION_MAJOR		2
 #define CRYPTOKI_VERSION_MINOR		20
-#define CRYPTOKI_VERSION_REVISION	4
+#define CRYPTOKI_VERSION_REVISION	6
 
 
+/* Compatibility interface is default, unless CRYPTOKI_GNU is
+   given.  */
+#ifndef CRYPTOKI_GNU
 #ifndef CRYPTOKI_COMPAT
 #define CRYPTOKI_COMPAT 1
 #endif
+#endif
 
 /* System dependencies.  */
 
@@ -169,7 +179,7 @@ extern "C" {
 #define unlock_mutex UnlockMutex
 #define reserved pReserved
 
-#endif
+#endif	/* CRYPTOKI_COMPAT */
 
 

 
@@ -1321,11 +1331,11 @@ typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR;
 
 

 /* System dependencies.  */
-#ifdef __WIN32
+#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32)
 #pragma pack(pop, cryptoki)
 #endif
 
-#ifdef __cplusplus
+#if defined(__cplusplus)
 }
 #endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list