2003-07-23 12:12:24 -04:00
|
|
|
/*
|
|
|
|
* 'OpenSSL for Ruby' project
|
|
|
|
* Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
/*
|
2015-04-19 23:55:09 -04:00
|
|
|
* This program is licensed under the same licence as Ruby.
|
2003-07-23 12:12:24 -04:00
|
|
|
* (See the file 'LICENCE'.)
|
|
|
|
*/
|
|
|
|
#if !defined(_OSSL_OPENSSL_MISSING_H_)
|
|
|
|
#define _OSSL_OPENSSL_MISSING_H_
|
|
|
|
|
2016-05-25 04:50:03 -04:00
|
|
|
/* added in 1.0.0 */
|
|
|
|
#if !defined(HAVE_EVP_CIPHER_CTX_COPY)
|
|
|
|
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
|
2008-05-15 05:44:38 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_HMAC_CTX_COPY)
|
|
|
|
void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
|
|
|
|
#endif
|
|
|
|
|
2016-05-25 04:50:03 -04:00
|
|
|
/* added in 1.0.2 */
|
2016-05-30 05:30:38 -04:00
|
|
|
#if !defined(OPENSSL_NO_EC)
|
|
|
|
#if !defined(HAVE_EC_CURVE_NIST2NID)
|
|
|
|
int EC_curve_nist2nid(const char *);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2016-05-25 04:50:03 -04:00
|
|
|
#if !defined(HAVE_X509_REVOKED_DUP)
|
|
|
|
# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
|
|
|
|
(d2i_of_void *)d2i_X509_REVOKED, (char *)(rev))
|
2005-04-15 15:16:18 -04:00
|
|
|
#endif
|
|
|
|
|
2016-05-25 04:50:03 -04:00
|
|
|
/* added in 1.1.0 */
|
2010-09-05 22:08:30 -04:00
|
|
|
#if !defined(HAVE_X509_STORE_GET_EX_DATA)
|
2016-05-19 00:53:05 -04:00
|
|
|
# define X509_STORE_get_ex_data(x, idx) \
|
|
|
|
CRYPTO_get_ex_data(&(x)->ex_data, (idx))
|
2010-09-05 22:08:30 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_X509_STORE_SET_EX_DATA)
|
2016-05-19 00:53:05 -04:00
|
|
|
# define X509_STORE_set_ex_data(x, idx, data) \
|
|
|
|
CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
|
|
|
|
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
|
|
|
|
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
|
|
|
|
(newf), (dupf), (freef))
|
2008-05-15 05:44:38 -04:00
|
|
|
#endif
|
|
|
|
|
2016-06-05 08:46:05 -04:00
|
|
|
#if !defined(HAVE_X509_UP_REF)
|
|
|
|
# define X509_up_ref(x) \
|
|
|
|
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_X509_CRL_UP_REF)
|
|
|
|
# define X509_CRL_up_ref(x) \
|
|
|
|
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_CRL);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_X509_STORE_UP_REF)
|
|
|
|
# define X509_STORE_up_ref(x) \
|
|
|
|
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_STORE);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_SSL_SESSION_UP_REF)
|
|
|
|
# define SSL_SESSION_up_ref(x) \
|
|
|
|
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_SSL_SESSION);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(HAVE_EVP_PKEY_UP_REF)
|
|
|
|
# define EVP_PKEY_up_ref(x) \
|
|
|
|
CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_EVP_PKEY);
|
|
|
|
#endif
|
|
|
|
|
2003-07-23 12:12:24 -04:00
|
|
|
#endif /* _OSSL_OPENSSL_MISSING_H_ */
|