Treat LibreSSL as an older OpenSSL

This commit is contained in:
Xiaogrill 2018-02-11 09:02:57 -08:00 committed by Johanna Amann
parent 0e83bd3193
commit cbe585dd87
2 changed files with 3 additions and 3 deletions

View file

@ -8,13 +8,13 @@
#include "Val.h"
#include "X509Common.h"
#if (OPENSSL_VERSION_NUMBER < 0x10002000L)
#if (OPENSSL_VERSION_NUMBER < 0x10002000L || LIBRESSL_VERSION_NUMBER)
#define X509_get_signature_nid(x) OBJ_obj2nid((x)->sig_alg->algorithm)
#endif
#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || LIBRESSL_VERSION_NUMBER)
#define X509_OBJECT_new() (X509_OBJECT*)malloc(sizeof(X509_OBJECT))
#define X509_OBJECT_free(a) free(a)

View file

@ -668,7 +668,7 @@ function sct_verify%(cert: opaque of x509, logid: string, log_key: string, signa
uint32 cert_length;
if ( precert )
{
#if (OPENSSL_VERSION_NUMBER < 0x10002000L)
#if (OPENSSL_VERSION_NUMBER < 0x10002000L || LIBRESSL_VERSION_NUMBER)
x->cert_info->enc.modified = 1;
cert_length = i2d_X509_CINF(x->cert_info, &cert_out);
#else