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 extern volatile sig_atomic_t got_signal; 31 #endif 32 33 #endif /* _EXTERN_H_ */ 34