mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04:00
[ssl] Allow older versions of openssl. Refs #37
This commit is contained in:
parent
51dd9e7e6e
commit
e8cb012ada
@ -1125,6 +1125,9 @@ else
|
|||||||
EL_CONFIG(CONFIG_OPENSSL, [OpenSSL])
|
EL_CONFIG(CONFIG_OPENSSL, [OpenSSL])
|
||||||
chosen_ssl_library="OpenSSL"
|
chosen_ssl_library="OpenSSL"
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(RAND_bytes)
|
||||||
|
AC_CHECK_FUNCS(ASN1_STRING_get0_data)
|
||||||
|
|
||||||
CFLAGS="$CFLAGS_X"
|
CFLAGS="$CFLAGS_X"
|
||||||
AC_SUBST(OPENSSL_CFLAGS)
|
AC_SUBST(OPENSSL_CFLAGS)
|
||||||
fi
|
fi
|
||||||
|
@ -247,7 +247,12 @@ static int
|
|||||||
match_uri_host_ip(const unsigned char *uri_host,
|
match_uri_host_ip(const unsigned char *uri_host,
|
||||||
ASN1_OCTET_STRING *cert_host_asn1)
|
ASN1_OCTET_STRING *cert_host_asn1)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_ASN1_STRING_GET0_DATA
|
||||||
const unsigned char *cert_host_addr = ASN1_STRING_get0_data(cert_host_asn1);
|
const unsigned char *cert_host_addr = ASN1_STRING_get0_data(cert_host_asn1);
|
||||||
|
#else
|
||||||
|
const unsigned char *cert_host_addr = ASN1_STRING_data(cert_host_asn1);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct in_addr uri_host_in;
|
struct in_addr uri_host_in;
|
||||||
#ifdef CONFIG_IPV6
|
#ifdef CONFIG_IPV6
|
||||||
struct in6_addr uri_host_in6;
|
struct in6_addr uri_host_in6;
|
||||||
|
@ -470,7 +470,11 @@ void
|
|||||||
random_nonce(unsigned char buf[], size_t size)
|
random_nonce(unsigned char buf[], size_t size)
|
||||||
{
|
{
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
|
#ifdef HAVE_RAND_BYTES
|
||||||
RAND_bytes(buf, size);
|
RAND_bytes(buf, size);
|
||||||
|
#else
|
||||||
|
RAND_pseudo_bytes(buf, size);
|
||||||
|
#endif
|
||||||
#elif defined(CONFIG_GNUTLS)
|
#elif defined(CONFIG_GNUTLS)
|
||||||
gcry_create_nonce(buf, size);
|
gcry_create_nonce(buf, size);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user