summaryrefslogtreecommitdiff
path: root/ssh-pkcs11.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-pkcs11.c')
-rw-r--r--ssh-pkcs11.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 0c8629a37..bcbf727e6 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-pkcs11.c,v 1.30 2019/01/20 23:01:59 djm Exp $ */ 1/* $OpenBSD: ssh-pkcs11.c,v 1.31 2019/01/20 23:03:26 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2010 Markus Friedl. All rights reserved. 3 * Copyright (c) 2010 Markus Friedl. All rights reserved.
4 * Copyright (c) 2014 Pedro Martelletto. All rights reserved. 4 * Copyright (c) 2014 Pedro Martelletto. All rights reserved.
@@ -877,12 +877,11 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
877 key->flags |= SSHKEY_FLAG_EXT; 877 key->flags |= SSHKEY_FLAG_EXT;
878 rsa = NULL; /* now owned by key */ 878 rsa = NULL; /* now owned by key */
879 } else if (EVP_PKEY_base_id(evp) == EVP_PKEY_EC) { 879 } else if (EVP_PKEY_base_id(evp) == EVP_PKEY_EC) {
880 /* XXX XXX fix accessor */ 880 if (EVP_PKEY_get0_EC_KEY(evp) == NULL) {
881 if (evp->pkey.ec == NULL) {
882 error("invalid x509; no ec key"); 881 error("invalid x509; no ec key");
883 goto fail; 882 goto fail;
884 } 883 }
885 if ((ec = EC_KEY_dup(evp->pkey.ec)) == NULL) { 884 if ((ec = EC_KEY_dup(EVP_PKEY_get0_EC_KEY(evp))) == NULL) {
886 error("EC_KEY_dup failed"); 885 error("EC_KEY_dup failed");
887 goto fail; 886 goto fail;
888 } 887 }