1 /* 2 * Copyright (c) 2018-2021 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 _FIDO_RS256_H 8 #define _FIDO_RS256_H 9 10 #include <openssl/rsa.h> 11 12 #include <stdint.h> 13 #include <stdlib.h> 14 15 #ifdef _FIDO_INTERNAL 16 #include "types.h" 17 #else 18 #include <fido.h> 19 #endif 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif /* __cplusplus */ 24 25 rs256_pk_t *rs256_pk_new(void); 26 void rs256_pk_free(rs256_pk_t **); 27 EVP_PKEY *rs256_pk_to_EVP_PKEY(const rs256_pk_t *); 28 29 int rs256_pk_from_EVP_PKEY(rs256_pk_t *, const EVP_PKEY *); 30 int rs256_pk_from_RSA(rs256_pk_t *, const RSA *); 31 int rs256_pk_from_ptr(rs256_pk_t *, const void *, size_t); 32 33 #ifdef __cplusplus 34 } /* extern "C" */ 35 #endif /* __cplusplus */ 36 37 #endif /* !_FIDO_RS256_H */ 38