summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh-pkcs11.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index aaf712d9a..ea97508f1 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11.c,v 1.23 2016/10/28 03:33:52 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11.c,v 1.24 2017/05/30 14:15:17 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * 4 *
@@ -537,7 +537,8 @@ pkcs11_fetch_keys_filter(struct pkcs11_provider *p, CK_ULONG slotidx,
537 } 537 }
538 if (rsa && rsa->n && rsa->e && 538 if (rsa && rsa->n && rsa->e &&
539 pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) { 539 pkcs11_rsa_wrap(p, slotidx, &attribs[0], rsa) == 0) {
540 key = sshkey_new(KEY_UNSPEC); 540 if ((key = sshkey_new(KEY_UNSPEC)) == NULL)
541 fatal("sshkey_new failed");
541 key->rsa = rsa; 542 key->rsa = rsa;
542 key->type = KEY_RSA; 543 key->type = KEY_RSA;
543 key->flags |= SSHKEY_FLAG_EXT; 544 key->flags |= SSHKEY_FLAG_EXT;