summaryrefslogtreecommitdiff
path: root/ssh-pkcs11.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-02-29 12:15:15 +0000
committerColin Watson <cjwatson@debian.org>2016-03-08 11:51:22 +0000
commit46961f5704f8e86cea3e99253faad55aef4d8f35 (patch)
tree0dd97fa4fb649a62b4639fe2674380872b1f3e98 /ssh-pkcs11.c
parentc753fe267efb1b027424fa8706cf0385fc3d14c1 (diff)
parent85e40e87a75fb80a0bf893ac05a417d6c353537d (diff)
New upstream release (7.2).
Diffstat (limited to 'ssh-pkcs11.c')
-rw-r--r--ssh-pkcs11.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 92614a52d..d1f750db0 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11.c,v 1.21 2015/07/18 08:02:17 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11.c,v 1.22 2016/02/12 00:20:30 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * 4 *
@@ -322,8 +322,10 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
322 k11->slotidx = slotidx; 322 k11->slotidx = slotidx;
323 /* identify key object on smartcard */ 323 /* identify key object on smartcard */
324 k11->keyid_len = keyid_attrib->ulValueLen; 324 k11->keyid_len = keyid_attrib->ulValueLen;
325 k11->keyid = xmalloc(k11->keyid_len); 325 if (k11->keyid_len > 0) {
326 memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len); 326 k11->keyid = xmalloc(k11->keyid_len);
327 memcpy(k11->keyid, keyid_attrib->pValue, k11->keyid_len);
328 }
327 k11->orig_finish = def->finish; 329 k11->orig_finish = def->finish;
328 memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method)); 330 memcpy(&k11->rsa_method, def, sizeof(k11->rsa_method));
329 k11->rsa_method.name = "pkcs11"; 331 k11->rsa_method.name = "pkcs11";