[openssh-commits] [openssh] 07/11: upstream: improve some error messages; ok markus@

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Dec 30 21:17:40 AEDT 2019


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

djm pushed a commit to branch master
in repository openssh.

commit d433596736a2cd4818f538be11fc94783f5c5236
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Dec 30 09:24:03 2019 +0000

    upstream: improve some error messages; ok markus@
    
    OpenBSD-Commit-ID: 4ccd8ddabb8df4f995107dd3b7ea58220e93cb81
---
 ssh-sk.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/ssh-sk.c b/ssh-sk.c
index a5d3c64d..e1fb72cf 100644
--- a/ssh-sk.c
+++ b/ssh-sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-sk.c,v 1.21 2019/12/30 09:23:28 djm Exp $ */
+/* $OpenBSD: ssh-sk.c,v 1.22 2019/12/30 09:24:03 djm Exp $ */
 /*
  * Copyright (c) 2019 Google LLC
  *
@@ -115,13 +115,13 @@ sshsk_open(const char *path)
 		return ret;
 	}
 	if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) {
-		error("Security key provider %s dlopen failed: %s",
+		error("Security key provider \"%s\" dlopen failed: %s",
 		    path, dlerror());
 		goto fail;
 	}
 	if ((ret->sk_api_version = dlsym(ret->dlhandle,
 	    "sk_api_version")) == NULL) {
-		error("Security key provider %s dlsym(sk_api_version) "
+		error("Security key provider \"%s\" dlsym(sk_api_version) "
 		    "failed: %s", path, dlerror());
 		goto fail;
 	}
@@ -129,9 +129,9 @@ sshsk_open(const char *path)
 	debug("%s: provider %s implements version 0x%08lx", __func__,
 	    ret->path, (u_long)version);
 	if ((version & SSH_SK_VERSION_MAJOR_MASK) != SSH_SK_VERSION_MAJOR) {
-		error("Security key provider %s implements unsupported version "
-		    "0x%08lx (supported: 0x%08lx)", path, (u_long)version,
-		    (u_long)SSH_SK_VERSION_MAJOR);
+		error("Security key provider \"%s\" implements unsupported "
+		    "version 0x%08lx (supported: 0x%08lx)",
+		    path, (u_long)version, (u_long)SSH_SK_VERSION_MAJOR);
 		goto fail;
 	}
 	if ((ret->sk_enroll = dlsym(ret->dlhandle, "sk_enroll")) == NULL) {
@@ -140,14 +140,14 @@ sshsk_open(const char *path)
 		goto fail;
 	}
 	if ((ret->sk_sign = dlsym(ret->dlhandle, "sk_sign")) == NULL) {
-		error("Security key provider %s dlsym(sk_sign) failed: %s",
+		error("Security key provider \"%s\" dlsym(sk_sign) failed: %s",
 		    path, dlerror());
 		goto fail;
 	}
 	if ((ret->sk_load_resident_keys = dlsym(ret->dlhandle,
 	    "sk_load_resident_keys")) == NULL) {
-		error("Security key provider %s dlsym(sk_load_resident_keys) "
-		    "failed: %s", path, dlerror());
+		error("Security key provider \"%s\" "
+		    "dlsym(sk_load_resident_keys) failed: %s", path, dlerror());
 		goto fail;
 	}
 	/* success */
@@ -394,7 +394,7 @@ sshsk_enroll(int type, const char *provider_path, const char *application,
 	/* enroll key */
 	if ((r = skp->sk_enroll(alg, challenge, challenge_len, application,
 	    flags, pin, &resp)) != 0) {
-		error("Security key provider %s returned failure %d",
+		error("Security key provider \"%s\" returned failure %d",
 		    provider_path, r);
 		r = SSH_ERR_INVALID_FORMAT; /* XXX error codes in API? */
 		goto out;
@@ -653,7 +653,7 @@ sshsk_load_resident(const char *provider_path, const char *pin,
 		goto out;
 	}
 	if ((r = skp->sk_load_resident_keys(pin, &rks, &nrks)) != 0) {
-		error("Security key provider %s returned failure %d",
+		error("Security key provider \"%s\" returned failure %d",
 		    provider_path, r);
 		r = SSH_ERR_INVALID_FORMAT; /* XXX error codes in API? */
 		goto out;

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


More information about the openssh-commits mailing list