[glib/pgriffis/pkcs11-password] gtlspassword: Add flags signifiying PIN type for PKCS#11




commit 2dc45c5bc4f25d6671f4ce8f8f9439cfddd5742d
Author: Patrick Griffis <pgriffis igalia com>
Date:   Sat May 29 10:14:20 2021 -0500

    gtlspassword: Add flags signifiying PIN type for PKCS#11
    
    In a PKCS#11 operation there are multiple types of PINs possibly
    needed and these flags add a way to expose them to the user.
    
    This design exactly matches gnutls' gnutls_pin_flag_t API.

 gio/gioenums.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gio/gioenums.h b/gio/gioenums.h
index f2f66c875..9d399cdcc 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1703,6 +1703,12 @@ typedef enum {
  *    wrong many times, and the user may not have many chances left.
  * @G_TLS_PASSWORD_FINAL_TRY: Hint to the user that this is the last try to get
  *    this password right.
+ * @G_TLS_PASSWORD_PKCS11_USER: The user PIN is required for PKCS#11.
+ *    Since: 2.70.
+ * @G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER: The security officer PIN is
+ *    required for PKCS#11. Since: 2.70.
+ * @G_TLS_PASSWORD_CONTEXT_SPECIFIC: The context specific PIN is required for
+ *    PKCS#11. Since: 2.70.
  *
  * Various flags for the password.
  *
@@ -1714,7 +1720,10 @@ typedef enum _GTlsPasswordFlags
   G_TLS_PASSWORD_NONE = 0,
   G_TLS_PASSWORD_RETRY = 1 << 1,
   G_TLS_PASSWORD_MANY_TRIES = 1 << 2,
-  G_TLS_PASSWORD_FINAL_TRY = 1 << 3
+  G_TLS_PASSWORD_FINAL_TRY = 1 << 3,
+  G_TLS_PASSWORD_PKCS11_USER = 1 << 4,
+  G_TLS_PASSWORD_PKCS11_SECURITY_OFFICER = 1 << 5,
+  G_TLS_PASSWORD_PKCS11_CONTEXT_SPECIFIC = 1 << 6
 } GTlsPasswordFlags;
 
 /**


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