mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
cd002305f0
Clean up old version guards in preparation for the upcoming OpenSSL 3.0 support. OpenSSL 1.0.1 reached its EOL on 2016-12-31. At that time, we decided to keep 1.0.1 support because many major Linux distributions were still shipped with 1.0.1. Now, nearly 4 years later, most Linux distributions are reaching their EOL and it should be safe to assume nobody uses them anymore. Major ones that were using 1.0.1: - Ubuntu 14.04 is EOL since 2019-04-30 - RHEL 6 will reach EOL on 2020-11-30 LibreSSL 3.0 and older versions are no longer supported by the LibreSSL team as of October 2020. Note that OpenSSL 1.0.2 also reached EOL on 2019-12-31 and 1.1.0 also did on 2018-08-31. https://github.com/ruby/openssl/commit/c055938f4b
43 lines
962 B
C
43 lines
962 B
C
/*
|
|
* 'OpenSSL for Ruby' project
|
|
* Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
|
|
* All rights reserved.
|
|
*/
|
|
/*
|
|
* This program is licensed under the same licence as Ruby.
|
|
* (See the file 'LICENCE'.)
|
|
*/
|
|
#include RUBY_EXTCONF_H
|
|
|
|
#include <string.h> /* memcpy() */
|
|
#if !defined(OPENSSL_NO_ENGINE)
|
|
# include <openssl/engine.h>
|
|
#endif
|
|
#include <openssl/x509_vfy.h>
|
|
|
|
#include "openssl_missing.h"
|
|
|
|
/*** added in 1.1.0 ***/
|
|
#if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
|
|
void
|
|
ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
|
|
const X509_ALGOR **palg)
|
|
{
|
|
if (psig != NULL)
|
|
*psig = crl->signature;
|
|
if (palg != NULL)
|
|
*palg = crl->sig_alg;
|
|
}
|
|
#endif
|
|
|
|
#if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
|
|
void
|
|
ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
|
|
const X509_ALGOR **palg)
|
|
{
|
|
if (psig != NULL)
|
|
*psig = req->signature;
|
|
if (palg != NULL)
|
|
*palg = req->sig_alg;
|
|
}
|
|
#endif
|