Commit 354d8574 authored by Matti Picus's avatar Matti Picus
Browse files

remove deprecated OpenSSL functions, change OpenSSL link command for buildbots

parent fc5507c76c91
Pipeline #59649 passed with stage
in 9 minutes
......@@ -64,7 +64,6 @@ ffi = build_ffi_for_binding(
"bignum",
"bio",
"cmac",
"conf",
"crypto",
"ct",
"dh",
......
......@@ -45,7 +45,7 @@ FUNCTIONS = """
void ASN1_OBJECT_free(ASN1_OBJECT *);
/* ASN1 STRING */
unsigned char *ASN1_STRING_data(ASN1_STRING *);
const unsigned char *ASN1_STRING_get0_data(ASN1_STRING *);
int ASN1_STRING_set(ASN1_STRING *, const void *, int);
/* ASN1 OCTET STRING */
......
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
INCLUDES = """
#include <openssl/conf.h>
"""
TYPES = """
"""
FUNCTIONS = """
void OPENSSL_config(const char *);
/* This is a macro in 1.1.0 */
void OPENSSL_no_config(void);
"""
CUSTOMIZATIONS = """
"""
......@@ -376,30 +376,10 @@ unsigned long SSL_CTX_add_extra_chain_cert(SSL_CTX *, X509 *);
/* methods */
/*
* TLSv1_1 and TLSv1_2 are recent additions. Only sufficiently new versions of
* OpenSSL support them.
*/
const SSL_METHOD *TLSv1_1_method(void);
const SSL_METHOD *TLSv1_1_server_method(void);
const SSL_METHOD *TLSv1_1_client_method(void);
const SSL_METHOD *TLSv1_2_method(void);
const SSL_METHOD *TLSv1_2_server_method(void);
const SSL_METHOD *TLSv1_2_client_method(void);
const SSL_METHOD *SSLv3_method(void);
const SSL_METHOD *SSLv3_server_method(void);
const SSL_METHOD *SSLv3_client_method(void);
const SSL_METHOD *TLSv1_method(void);
const SSL_METHOD *TLSv1_server_method(void);
const SSL_METHOD *TLSv1_client_method(void);
const SSL_METHOD *DTLSv1_method(void);
const SSL_METHOD *DTLSv1_server_method(void);
const SSL_METHOD *DTLSv1_client_method(void);
/* Added in 1.0.2 */
const SSL_METHOD *DTLS_method(void);
const SSL_METHOD *DTLS_server_method(void);
......
......@@ -225,8 +225,6 @@ int sk_X509_CRL_push(Cryptography_STACK_OF_X509_CRL *, X509_CRL *);
X509_CRL *sk_X509_CRL_value(Cryptography_STACK_OF_X509_CRL *, int);
long X509_CRL_get_version(X509_CRL *);
ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *);
ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *);
X509_NAME *X509_CRL_get_issuer(X509_CRL *);
Cryptography_STACK_OF_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *);
......
......@@ -88,6 +88,9 @@ def extra_link_args(compiler_type):
# default on Python 3.3+ but not on 2.x.
return ['/NXCOMPAT', '/DYNAMICBASE']
else:
# The PyPy buildbots install OpenSSL to /usr/local/lib
if os.path.exists("/usr/local/lib"):
return["-L/usr/local/lib"]
return []
......
......@@ -3,9 +3,9 @@ from _pypy_openssl import ffi
from _pypy_openssl import lib
def _string_from_asn1(asn1):
data = lib.ASN1_STRING_data(asn1)
data = lib.ASN1_STRING_get0_data(asn1)
length = lib.ASN1_STRING_length(asn1)
return _str_with_len(ffi.cast("char*",data), length)
return _str_with_len(ffi.cast("const char*",data), length)
def _str_with_len(char_ptr, length):
return ffi.buffer(char_ptr, length)[:]
......
......@@ -23,7 +23,6 @@ ffi = build_ffi_for_binding(
"bignum",
"bio",
"cmac",
"conf",
"crypto",
"ct",
"dh",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment