xref: /freebsd/contrib/libfido2/examples/extern.h (revision 2ccfa855b2fc331819953e3de1b1c15ce5b95a7e)
10afa8e06SEd Maste /*
2*2ccfa855SEd Maste  * Copyright (c) 2018-2022 Yubico AB. All rights reserved.
30afa8e06SEd Maste  * Use of this source code is governed by a BSD-style
40afa8e06SEd Maste  * license that can be found in the LICENSE file.
5*2ccfa855SEd Maste  * SPDX-License-Identifier: BSD-2-Clause
60afa8e06SEd Maste  */
70afa8e06SEd Maste 
80afa8e06SEd Maste #ifndef _EXTERN_H_
90afa8e06SEd Maste #define _EXTERN_H_
100afa8e06SEd Maste 
110afa8e06SEd Maste #include <openssl/ec.h>
120afa8e06SEd Maste #include <openssl/evp.h>
130afa8e06SEd Maste #include <openssl/rsa.h>
140afa8e06SEd Maste 
150afa8e06SEd Maste /* util.c */
160afa8e06SEd Maste EC_KEY *read_ec_pubkey(const char *);
170afa8e06SEd Maste RSA *read_rsa_pubkey(const  char *);
180afa8e06SEd Maste EVP_PKEY *read_eddsa_pubkey(const char *);
190afa8e06SEd Maste int base10(const char *, long long *);
200afa8e06SEd Maste int read_blob(const char *, unsigned char **, size_t *);
210afa8e06SEd Maste int write_blob(const char *, const unsigned char *, size_t);
22*2ccfa855SEd Maste int write_es256_pubkey(const char *, const void *, size_t);
23*2ccfa855SEd Maste int write_es384_pubkey(const char *, const void *, size_t);
24*2ccfa855SEd Maste int write_rs256_pubkey(const char *, const void *, size_t);
250afa8e06SEd Maste int write_eddsa_pubkey(const char *, const void *, size_t);
260afa8e06SEd Maste 
270afa8e06SEd Maste #endif /* _EXTERN_H_ */
28