xref: /freebsd/contrib/libfido2/examples/extern.h (revision 66fd12cf4896eb08ad8e7a2627537f84ead84dd3)
1 /*
2  * Copyright (c) 2018 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  */
6 
7 #ifndef _EXTERN_H_
8 #define _EXTERN_H_
9 
10 #include <openssl/ec.h>
11 #include <openssl/evp.h>
12 #include <openssl/rsa.h>
13 
14 /* util.c */
15 EC_KEY *read_ec_pubkey(const char *);
16 RSA *read_rsa_pubkey(const  char *);
17 EVP_PKEY *read_eddsa_pubkey(const char *);
18 int base10(const char *, long long *);
19 int read_blob(const char *, unsigned char **, size_t *);
20 int write_blob(const char *, const unsigned char *, size_t);
21 int write_ec_pubkey(const char *, const void *, size_t);
22 int write_rsa_pubkey(const char *, const void *, size_t);
23 int write_eddsa_pubkey(const char *, const void *, size_t);
24 
25 #endif /* _EXTERN_H_ */
26