xref: /freebsd/contrib/libfido2/src/fido/rs256.h (revision bfcc09ddd422c95a1a2e4e794b63ee54c4902398)
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 _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_RSA(rs256_pk_t *, const RSA *);
30 int rs256_pk_from_ptr(rs256_pk_t *, const void *, size_t);
31 
32 #ifdef __cplusplus
33 } /* extern "C" */
34 #endif /* __cplusplus */
35 
36 #endif /* !_FIDO_RS256_H */
37