/*1* Copyright (c) 2018-2021 Yubico AB. All rights reserved.2* SPDX-License-Identifier: BSD-2-Clause3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions are6* met:7*8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in12* the documentation and/or other materials provided with the13* distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS16* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT17* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR18* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT19* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,20* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT21* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,22* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY23* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE25* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.26*/2728#ifndef _FIDO_RS256_H29#define _FIDO_RS256_H3031#include <openssl/rsa.h>3233#include <stdint.h>34#include <stdlib.h>3536#ifdef _FIDO_INTERNAL37#include "types.h"38#else39#include <fido.h>40#endif4142#ifdef __cplusplus43extern "C" {44#endif /* __cplusplus */4546rs256_pk_t *rs256_pk_new(void);47void rs256_pk_free(rs256_pk_t **);48EVP_PKEY *rs256_pk_to_EVP_PKEY(const rs256_pk_t *);4950int rs256_pk_from_EVP_PKEY(rs256_pk_t *, const EVP_PKEY *);51int rs256_pk_from_RSA(rs256_pk_t *, const RSA *);52int rs256_pk_from_ptr(rs256_pk_t *, const void *, size_t);5354#ifdef __cplusplus55} /* extern "C" */56#endif /* __cplusplus */5758#endif /* !_FIDO_RS256_H */596061