diff options
author | 2019-11-14 21:14:10 +0000 | |
---|---|---|
committer | 2019-11-14 21:14:10 +0000 | |
commit | d75efeb73338e77fafc7850eff396e820d2d7935 (patch) | |
tree | aae45e648d23698ee6ff08637f11476e42e5a447 /lib/libfido2/src/blob.h | |
parent | Unleash all the available openings and let the midlayer sort things (diff) | |
download | wireguard-openbsd-d75efeb73338e77fafc7850eff396e820d2d7935.tar.xz wireguard-openbsd-d75efeb73338e77fafc7850eff396e820d2d7935.zip |
import libfido2 (git HEAD). This library allows communication with
U2F/FIDO2 devices over USB.
feedback and "start the churn" deraadt@
Diffstat (limited to 'lib/libfido2/src/blob.h')
-rw-r--r-- | lib/libfido2/src/blob.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libfido2/src/blob.h b/lib/libfido2/src/blob.h new file mode 100644 index 00000000000..6358c0594ae --- /dev/null +++ b/lib/libfido2/src/blob.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018 Yubico AB. All rights reserved. + * Use of this source code is governed by a BSD-style + * license that can be found in the LICENSE file. + */ + +#ifndef _BLOB_H +#define _BLOB_H + +typedef struct fido_blob { + unsigned char *ptr; + size_t len; +} fido_blob_t; + +typedef struct fido_blob_array { + fido_blob_t *ptr; + size_t len; +} fido_blob_array_t; + +cbor_item_t *fido_blob_encode(const fido_blob_t *); +fido_blob_t *fido_blob_new(void); +int fido_blob_decode(const cbor_item_t *, fido_blob_t *); +int fido_blob_is_empty(const fido_blob_t *); +int fido_blob_set(fido_blob_t *, const unsigned char *, size_t); +void fido_blob_free(fido_blob_t **); +void free_blob_array(fido_blob_array_t *); + +#endif /* !_BLOB_H */ |