diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-12-30 09:24:45 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-12-30 21:01:51 +1100 |
commit | 43ce96427b76c4918e39af654e2fc9ee18d5d478 (patch) | |
tree | dfb3a5b32e02368f9739bb742e0aa858ced03701 /sk-api.h | |
parent | d433596736a2cd4818f538be11fc94783f5c5236 (diff) |
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
Diffstat (limited to 'sk-api.h')
-rw-r--r-- | sk-api.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sk-api.h,v 1.5 2019/12/30 09:23:28 djm Exp $ */ | 1 | /* $OpenBSD: sk-api.h,v 1.6 2019/12/30 09:24:45 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2019 Google LLC | 3 | * Copyright (c) 2019 Google LLC |
4 | * | 4 | * |
@@ -32,6 +32,11 @@ | |||
32 | #define SSH_SK_ECDSA 0x00 | 32 | #define SSH_SK_ECDSA 0x00 |
33 | #define SSH_SK_ED25519 0x01 | 33 | #define SSH_SK_ED25519 0x01 |
34 | 34 | ||
35 | /* Error codes */ | ||
36 | #define SSH_SK_ERR_GENERAL -1 | ||
37 | #define SSH_SK_ERR_UNSUPPORTED -2 | ||
38 | #define SSH_SK_ERR_PIN_REQUIRED -3 | ||
39 | |||
35 | struct sk_enroll_response { | 40 | struct sk_enroll_response { |
36 | uint8_t *public_key; | 41 | uint8_t *public_key; |
37 | size_t public_key_len; | 42 | size_t public_key_len; |