Blame libfreerdp/crypto/opensslcompat.h

Packit 1fb8d4
/**
Packit 1fb8d4
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit 1fb8d4
 * OpenSSL Compatibility
Packit 1fb8d4
 *
Packit 1fb8d4
 * Copyright (C) 2016 Norbert Federa <norbert.federa@thincast.com>
Packit 1fb8d4
 *
Packit 1fb8d4
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit 1fb8d4
 * you may not use this file except in compliance with the License.
Packit 1fb8d4
 * You may obtain a copy of the License at
Packit 1fb8d4
 *
Packit 1fb8d4
 *		 http://www.apache.org/licenses/LICENSE-2.0
Packit 1fb8d4
 *
Packit 1fb8d4
 * Unless required by applicable law or agreed to in writing, software
Packit 1fb8d4
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 1fb8d4
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 1fb8d4
 * See the License for the specific language governing permissions and
Packit 1fb8d4
 * limitations under the License.
Packit 1fb8d4
 */
Packit 1fb8d4
Packit 1fb8d4
#ifndef FREERDP_LIB_CRYPTO_OPENSSLCOMPAT_H
Packit 1fb8d4
#define FREERDP_LIB_CRYPTO_OPENSSLCOMPAT_H
Packit 1fb8d4
Packit 1fb8d4
#ifdef HAVE_CONFIG_H
Packit 1fb8d4
#include "config.h"
Packit 1fb8d4
#endif
Packit 1fb8d4
Packit 1fb8d4
#include <freerdp/api.h>
Packit 1fb8d4
Packit 1fb8d4
#ifdef WITH_OPENSSL
Packit 1fb8d4
Packit 1fb8d4
#include <openssl/opensslv.h>
Packit 1fb8d4
Packit 1fb8d4
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
Packit 1fb8d4
Packit 1fb8d4
#include <openssl/bio.h>
Packit 1fb8d4
#include <openssl/rsa.h>
Packit 1fb8d4
#include <openssl/bn.h>
Packit 1fb8d4
Packit Service 5a9772
#define BIO_get_data(b) (b)->ptr
Packit Service 5a9772
#define BIO_set_data(b, v) (b)->ptr = v
Packit Service 5a9772
#define BIO_get_init(b) (b)->init
Packit Service 5a9772
#define BIO_set_init(b, v) (b)->init = v
Packit Service 5a9772
#define BIO_get_next(b, v) (b)->next_bio
Packit Service 5a9772
#define BIO_set_next(b, v) (b)->next_bio = v
Packit Service 5a9772
#define BIO_get_shutdown(b) (b)->shutdown
Packit Service 5a9772
#define BIO_set_shutdown(b, v) (b)->shutdown = v
Packit Service 5a9772
#define BIO_get_retry_reason(b) (b)->retry_reason
Packit Service 5a9772
#define BIO_set_retry_reason(b, v) (b)->retry_reason = v
Packit 1fb8d4
Packit Service 5a9772
#define BIO_meth_set_write(b, f) (b)->bwrite = (f)
Packit Service 5a9772
#define BIO_meth_set_read(b, f) (b)->bread = (f)
Packit Service 5a9772
#define BIO_meth_set_puts(b, f) (b)->bputs = (f)
Packit Service 5a9772
#define BIO_meth_set_gets(b, f) (b)->bgets = (f)
Packit Service 5a9772
#define BIO_meth_set_ctrl(b, f) (b)->ctrl = (f)
Packit Service 5a9772
#define BIO_meth_set_create(b, f) (b)->create = (f)
Packit Service 5a9772
#define BIO_meth_set_destroy(b, f) (b)->destroy = (f)
Packit Service 5a9772
#define BIO_meth_set_callback_ctrl(b, f) (b)->callback_ctrl = (f)
Packit 1fb8d4
Packit 1fb8d4
BIO_METHOD* BIO_meth_new(int type, const char* name);
Packit 1fb8d4
void RSA_get0_key(const RSA* r, const BIGNUM** n, const BIGNUM** e, const BIGNUM** d);
Packit 1fb8d4
Packit 1fb8d4
#endif /* OPENSSL < 1.1.0 || LIBRESSL */
Packit 1fb8d4
#endif /* WITH_OPENSSL */
Packit 1fb8d4
Packit 1fb8d4
#endif /* FREERDP_LIB_CRYPTO_OPENSSLCOMPAT_H */