summaryrefslogtreecommitdiff
path: root/p11-kit/pin.c
diff options
context:
space:
mode:
Diffstat (limited to 'p11-kit/pin.c')
-rw-r--r--p11-kit/pin.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/p11-kit/pin.c b/p11-kit/pin.c
index 5ede97a..572c138 100644
--- a/p11-kit/pin.c
+++ b/p11-kit/pin.c
@@ -509,7 +509,7 @@ p11_kit_pin_file_callback (const char *pinfile,
* A structure representing a PKCS\#11 PIN. There are no public fields
* visible in this structure. Use the various accessor functions.
*/
-struct _P11KitPin {
+struct p11_kit_pin {
int ref_count;
unsigned char *buffer;
size_t length;
@@ -617,7 +617,7 @@ p11_kit_pin_new_for_buffer (unsigned char *buffer, size_t length,
*
* The value returned is owned by the P11KitPin and should not be modified.
* It remains valid as long as a reference to the PIN is held. The PIN value
- * will contain an extra null-terminator character.
+ * will not contain an extra null-terminator character.
*
* Returns: the value for the PIN.
*/
@@ -630,6 +630,20 @@ p11_kit_pin_get_value (P11KitPin *pin, size_t *length)
}
/**
+ * p11_kit_pin_get_length
+ * @pin: the P11KitPin
+ *
+ * Get the length of the PIN value from a P11KitPin.
+ *
+ * Returns: the length of the PIN value.
+ */
+size_t
+p11_kit_pin_get_length (P11KitPin *pin)
+{
+ return pin->length;
+}
+
+/**
* p11_kit_pin_ref:
* @pin: the P11KitPin
*