summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2021-06-25 06:30:23 +0000
committerDamien Miller <djm@cvs.openbsd.org>2021-06-25 06:30:23 +0000
commit0cda67d19b6eb750732b224f9b9986f247ca4f50 (patch)
treeccd443414ad825418fb498de16df28f30520c5c1
parentba59aecb1e14eeb09a3aab96d929a760a4c74f89 (diff)
fix decoding of X.509 subject name; from Leif Thuresson via bz3327
ok markus@
-rw-r--r--usr.bin/ssh/ssh-pkcs11.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-pkcs11.c b/usr.bin/ssh/ssh-pkcs11.c
index cc8ab3a5c9e..6287c66db13 100644
--- a/usr.bin/ssh/ssh-pkcs11.c
+++ b/usr.bin/ssh/ssh-pkcs11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11.c,v 1.52 2020/11/22 22:38:26 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11.c,v 1.53 2021/06/25 06:30:22 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
@@ -956,7 +956,7 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
}
/* Decode DER-encoded cert subject */
- cp = cert_attr[2].pValue;
+ cp = cert_attr[1].pValue;
if ((x509_name = d2i_X509_NAME(NULL, &cp,
cert_attr[1].ulValueLen)) == NULL ||
(subject = X509_NAME_oneline(x509_name, NULL, 0)) == NULL)