56 lines
2.3 KiB
Diff
56 lines
2.3 KiB
Diff
--- host/superscript.com/net/ucspi-ssl-0.99d/src/ssl_env.c
|
|
+++ host/superscript.com/net/ucspi-ssl-0.99d/src/ssl_env.c
|
|
@@ -47,7 +47,7 @@ static int set_env_name_entry(X509_NAME *xname,const char *env,int nid) {
|
|
int n;
|
|
|
|
if (!env) return 1;
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
for (m = 0; m < sk_X509_NAME_ENTRY_num(xname->entries); m++) {
|
|
xne = sk_X509_NAME_ENTRY_value(xname->entries,m);
|
|
n = OBJ_obj2nid(xne->object);
|
|
@@ -76,7 +76,7 @@ int ssl_session_vars(SSL *ssl) {
|
|
if (!env_str("SSL_PROTOCOL",SSL_get_version(ssl)))
|
|
return 0;
|
|
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
session = SSL_get_session(ssl);
|
|
x = session->session_id;
|
|
n = session->session_id_length;
|
|
@@ -227,7 +227,7 @@ static int ssl_client_vars(X509 *cert,STACK_OF(X509) *chain) {
|
|
set_env_id(xname,"SSL_CLIENT_I_DN_Email",NID_pkcs9_emailAddress);
|
|
|
|
/* Signature Algorithm for PubKey */
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
n = OBJ_obj2nid(cert->cert_info->signature->algorithm);
|
|
#else
|
|
sigalg = X509_get0_tbs_sigalg(cert);
|
|
@@ -238,7 +238,7 @@ static int ssl_client_vars(X509 *cert,STACK_OF(X509) *chain) {
|
|
return 0;
|
|
|
|
/* Algorithm for PubKey */
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
n = OBJ_obj2nid(cert->cert_info->key->algor->algorithm);
|
|
#else
|
|
pubkey = X509_get_X509_PUBKEY(cert);
|
|
@@ -371,7 +371,7 @@ static int ssl_server_vars(X509 *cert,STACK_OF(X509) *chain) {
|
|
set_env_id(xname,"SSL_SERVER_I_DN_Email",NID_pkcs9_emailAddress);
|
|
|
|
/* Signature Algorithm of PubKey */
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
n = OBJ_obj2nid(cert->cert_info->signature->algorithm);
|
|
#else
|
|
sigalg = X509_get0_tbs_sigalg(cert);
|
|
@@ -382,7 +382,7 @@ static int ssl_server_vars(X509 *cert,STACK_OF(X509) *chain) {
|
|
return 0;
|
|
|
|
/* Algorithm of PubKey */
|
|
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
|
n = OBJ_obj2nid(cert->cert_info->key->algor->algorithm);
|
|
#else
|
|
pubkey = X509_get_X509_PUBKEY(cert);
|