diff options
Diffstat (limited to 'examples/extern.h')
-rw-r--r-- | examples/extern.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/extern.h b/examples/extern.h new file mode 100644 index 0000000..578b8c4 --- /dev/null +++ b/examples/extern.h | |||
@@ -0,0 +1,32 @@ | |||
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 | #ifdef HAVE_SIGNAL_H | ||
15 | #include <signal.h> | ||
16 | #endif | ||
17 | |||
18 | /* util.c */ | ||
19 | EC_KEY *read_ec_pubkey(const char *); | ||
20 | RSA *read_rsa_pubkey(const char *); | ||
21 | EVP_PKEY *read_eddsa_pubkey(const char *); | ||
22 | int base10(const char *, long long *); | ||
23 | int read_blob(const char *, unsigned char **, size_t *); | ||
24 | int write_blob(const char *, const unsigned char *, size_t); | ||
25 | int write_ec_pubkey(const char *, const void *, size_t); | ||
26 | int write_rsa_pubkey(const char *, const void *, size_t); | ||
27 | int write_eddsa_pubkey(const char *, const void *, size_t); | ||
28 | #ifdef SIGNAL_EXAMPLE | ||
29 | void prepare_signal_handler(int); | ||
30 | #endif | ||
31 | |||
32 | #endif /* _EXTERN_H_ */ | ||