Displaying 2 results from an estimated 2 matches for "pinfilenam".
Did you mean:
pinfilename
2016 Nov 16
3
[PATCH] ssh-pkcs11: allow providing unconditional pin code for PKCS11
...CK_TOKEN_INFO token;
CK_SESSION_HANDLE session;
@@ -216,6 +218,36 @@ pkcs11_find(struct pkcs11_provider *p, CK_ULONG slotidx, CK_ATTRIBUTE *attr,
return (ret);
}
+/* read pin from a file specified in SSH_PKCS11_PINFILE if one exists */
+char *
+pkcs11_read_pinfile()
+{
+ FILE *f;
+ char *pinfilename;
+ char buf[SSH_MAX_PKCS11_PIN_BYTES];
+ int i;
+
+ if ((pinfilename = getenv("SSH_PKCS11_PINFILE")) == NULL)
+ return NULL;
+ if ((f = fopen(pinfilename, "r")) == NULL) {
+ debug("failed to read SSH_PKCS11_PINFILE");
+ return NULL;
+ }
+ if (fgets(buf, SSH_MAX_PKC...
2016 Nov 16
2
[PATCH] ssh-pkcs11: allow providing unconditional pin code for PKCS11
...otinfo {
CK_TOKEN_INFO token;
CK_SESSION_HANDLE session;
@@ -216,6 +218,36 @@ pkcs11_find(struct pkcs11_provider *p, CK_ULONG slotidx, CK_ATTRIBUTE *attr,
return (ret);
}
+/* read pin from a file specified in SSH_PKCS11_PINFILE if one exists */
+char *
+pkcs11_read_pinfile()
+{
+ FILE *f;
+ char *pinfilename;
+ char buf[SSH_MAX_PKCS11_PIN_BYTES];
+ int i;
+
+ if ((pinfilename = getenv("SSH_PKCS11_PINFILE")) == NULL)
+ return NULL;
+ if ((f = fopen(pinfilename, "r")) == NULL) {
+ debug("failed to read SSH_PKCS11_PINFILE");
+ return NULL;
+ }
+ if (fgets(buf, SSH_MAX_PKC...