xref: /freebsd/contrib/libfido2/examples/extern.h (revision 2ccfa855)
1 /*
2  * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
3  * Use of this source code is governed by a BSD-style
4  * license that can be found in the LICENSE file.
5  * SPDX-License-Identifier: BSD-2-Clause
6  */
7 
8 #ifndef _EXTERN_H_
9 #define _EXTERN_H_
10 
11 #include <openssl/ec.h>
12 #include <openssl/evp.h>
13 #include <openssl/rsa.h>
14 
15 /* util.c */
16 EC_KEY *read_ec_pubkey(const char *);
17 RSA *read_rsa_pubkey(const  char *);
18 EVP_PKEY *read_eddsa_pubkey(const char *);
19 int base10(const char *, long long *);
20 int read_blob(const char *, unsigned char **, size_t *);
21 int write_blob(const char *, const unsigned char *, size_t);
22 int write_es256_pubkey(const char *, const void *, size_t);
23 int write_es384_pubkey(const char *, const void *, size_t);
24 int write_rs256_pubkey(const char *, const void *, size_t);
25 int write_eddsa_pubkey(const char *, const void *, size_t);
26 
27 #endif /* _EXTERN_H_ */
28