[glib-networking/wip/tingping/pkcs11-2] fixup! fixup! WIP: Add PKCS #11 support



commit 7418781078bbb32cd7d9c4bf7ef27c386146523a
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Aug 8 13:30:10 2019 -0700

    fixup! fixup! WIP: Add PKCS #11 support

 tls/tests/mock-pkcs11.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/tls/tests/mock-pkcs11.c b/tls/tests/mock-pkcs11.c
index 1e749f4..675cf66 100644
--- a/tls/tests/mock-pkcs11.c
+++ b/tls/tests/mock-pkcs11.c
@@ -19,6 +19,23 @@
  *  Originally written for the Pkcs11Interop project by: Jaroslav IMRICH <jimrich jimrich sk>
  */
 
+/*
+ * This file implements a PKCS #11 module to be loaded that returns a mock slot and objects.
+ *
+ * It is based on this project originally: https://github.com/Pkcs11Interop/pkcs11-mock
+ *
+ * Quite a few things have been changed since then though:
+ * - The CK defines just below use glib macros just out of convenience.
+ * - Logging was added again just for ease of debugging.
+ * - Instead of hardcoded defines for objects this now has an array
+ *   of mock_objects that is easier to read and extend.
+ * - The certificates/keys are real certificates/keys backed by gnutls.
+ *   loading them in C_Initialize from glib-networkings normal test data.
+ *   This changes the behavior of many functions most notably including C_GetAttributeValue
+ *   and C_Sign to use them. Any function not used in a TLS handshake was largely
+ *   ignored and won't work.
+ */
+
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "MockPKCS11"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]