summaryrefslogtreecommitdiff
path: root/examples/extern.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/extern.h')
-rw-r--r--examples/extern.h32
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 */
19EC_KEY *read_ec_pubkey(const char *);
20RSA *read_rsa_pubkey(const char *);
21EVP_PKEY *read_eddsa_pubkey(const char *);
22int base10(const char *, long long *);
23int read_blob(const char *, unsigned char **, size_t *);
24int write_blob(const char *, const unsigned char *, size_t);
25int write_ec_pubkey(const char *, const void *, size_t);
26int write_rsa_pubkey(const char *, const void *, size_t);
27int write_eddsa_pubkey(const char *, const void *, size_t);
28#ifdef SIGNAL_EXAMPLE
29void prepare_signal_handler(int);
30#endif
31
32#endif /* _EXTERN_H_ */