From 43ce96427b76c4918e39af654e2fc9ee18d5d478 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Mon, 30 Dec 2019 09:24:45 +0000 Subject: upstream: translate and return error codes; retry on bad PIN Define some well-known error codes in the SK API and pass them back via ssh-sk-helper. Use the new "wrong PIN" error code to retry PIN prompting during ssh-keygen of resident keys. feedback and ok markus@ OpenBSD-Commit-ID: 9663c6a2bb7a0bc8deaccc6c30d9a2983b481620 --- sk-api.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sk-api.h') diff --git a/sk-api.h b/sk-api.h index 4f9f43ee..dc786d55 100644 --- a/sk-api.h +++ b/sk-api.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sk-api.h,v 1.5 2019/12/30 09:23:28 djm Exp $ */ +/* $OpenBSD: sk-api.h,v 1.6 2019/12/30 09:24:45 djm Exp $ */ /* * Copyright (c) 2019 Google LLC * @@ -32,6 +32,11 @@ #define SSH_SK_ECDSA 0x00 #define SSH_SK_ED25519 0x01 +/* Error codes */ +#define SSH_SK_ERR_GENERAL -1 +#define SSH_SK_ERR_UNSUPPORTED -2 +#define SSH_SK_ERR_PIN_REQUIRED -3 + struct sk_enroll_response { uint8_t *public_key; size_t public_key_len; -- cgit v1.2.1