[openssh-commits] [openssh] 02/04: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jul 20 10:32:38 AEST 2015


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

djm pushed a commit to branch master
in repository openssh.

commit b15fd989c8c62074397160147a8d5bc34b3f3c63
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Sat Jul 18 08:00:21 2015 +0000

    upstream commit
    
    skip uninitialised PKCS#11 slots; patch from Jakub Jelen
     in bz#2427 ok markus@
    
    Upstream-ID: 744c1e7796e237ad32992d0d02148e8a18f27d29
---
 ssh-pkcs11.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index e074175..4156d08 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11.c,v 1.19 2015/05/27 05:15:02 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11.c,v 1.20 2015/07/18 08:00:21 djm Exp $ */
 /*
  * Copyright (c) 2010 Markus Friedl.  All rights reserved.
  *
@@ -631,6 +631,11 @@ pkcs11_add_provider(char *provider_id, char *pin, struct sshkey ***keyp)
 			error("C_GetTokenInfo failed: %lu", rv);
 			continue;
 		}
+		if ((token->flags & CKF_TOKEN_INITIALIZED) == 0) {
+			debug2("%s: ignoring uninitialised token in slot %lu",
+			    __func__, (unsigned long)i);
+			continue;
+		}
 		rmspace(token->label, sizeof(token->label));
 		rmspace(token->manufacturerID, sizeof(token->manufacturerID));
 		rmspace(token->model, sizeof(token->model));

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list