Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13 - Update SSH_SK_VERSION_MAJOR from 7 to 9 #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/sk-api.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: sk-api.h,v 1.11 2020/09/09 03:08:01 djm Exp $ */
/* $OpenBSD: sk-api.h,v 1.14 2021/11/02 22:56:40 djm Exp $ */
/*
* Copyright (c) 2019 Google LLC
*
Expand Down Expand Up @@ -39,6 +39,7 @@
#define SSH_SK_ERR_DEVICE_NOT_FOUND -4

struct sk_enroll_response {
uint8_t flags;
uint8_t *public_key;
size_t public_key_len;
uint8_t *key_handle;
Expand Down Expand Up @@ -66,6 +67,8 @@ struct sk_resident_key {
char *application;
struct sk_enroll_response key;
uint8_t flags;
uint8_t *user_id;
size_t user_id_len;
};

struct sk_option {
Expand All @@ -74,7 +77,7 @@ struct sk_option {
uint8_t required;
};

#define SSH_SK_VERSION_MAJOR 0x00070000 /* current API version */
#define SSH_SK_VERSION_MAJOR 0x00090000 /* current API version */
#define SSH_SK_VERSION_MAJOR_MASK 0xffff0000

/* Return the version of the middleware API */
Expand All @@ -86,7 +89,7 @@ int sk_enroll(uint32_t alg, const uint8_t *challenge, size_t challenge_len,
struct sk_option **options, struct sk_enroll_response **enroll_response);

/* Sign a challenge */
int sk_sign(uint32_t alg, const uint8_t *message, size_t message_len,
int sk_sign(uint32_t alg, const uint8_t *data, size_t data_len,
const char *application, const uint8_t *key_handle, size_t key_handle_len,
uint8_t flags, const char *pin, struct sk_option **options,
struct sk_sign_response **sign_response);
Expand All @@ -95,4 +98,4 @@ int sk_sign(uint32_t alg, const uint8_t *message, size_t message_len,
int sk_load_resident_keys(const char *pin, struct sk_option **options,
struct sk_resident_key ***rks, size_t *nrks);

#endif /* _SK_API_H */
#endif /* _SK_API_H */
Loading