mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
GH-227: Improve LibreSSL support
This commit is contained in:
parent
e0b8b4b6b1
commit
fc43d06955
4 changed files with 20 additions and 15 deletions
|
@ -8,24 +8,27 @@
|
|||
#include "Val.h"
|
||||
#include "X509Common.h"
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER < 0x10002000L || LIBRESSL_VERSION_NUMBER)
|
||||
#if ( OPENSSL_VERSION_NUMBER < 0x10002000L ) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
#define X509_get_signature_nid(x) OBJ_obj2nid((x)->sig_alg->algorithm)
|
||||
|
||||
#endif
|
||||
|
||||
#if (OPENSSL_VERSION_NUMBER < 0x1010000fL || LIBRESSL_VERSION_NUMBER)
|
||||
#if ( OPENSSL_VERSION_NUMBER < 0x1010000fL ) || defined(LIBRESSL_VERSION_NUMBER)
|
||||
|
||||
#define X509_OBJECT_new() (X509_OBJECT*)malloc(sizeof(X509_OBJECT))
|
||||
#define X509_OBJECT_free(a) free(a)
|
||||
|
||||
#define OCSP_SINGLERESP_get0_id(s) (s)->certId
|
||||
#define OCSP_resp_get0_certs(x) (x)->certs
|
||||
|
||||
#define EVP_PKEY_get0_DSA(p) ((p)->pkey.dsa)
|
||||
#define EVP_PKEY_get0_EC_KEY(p) ((p)->pkey.ec)
|
||||
#define EVP_PKEY_get0_RSA(p) ((p)->pkey.rsa)
|
||||
|
||||
#if !defined(LIBRESSL_VERSION_NUMBER) || ( LIBRESSL_VERSION_NUMBER < 0x2070000fL )
|
||||
|
||||
#define OCSP_SINGLERESP_get0_id(s) (s)->certId
|
||||
|
||||
static X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a)
|
||||
{
|
||||
if ( a == nullptr || a->type != X509_LU_X509 )
|
||||
|
@ -57,6 +60,8 @@ static void RSA_get0_key(const RSA *r,
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
namespace file_analysis {
|
||||
|
||||
class X509Val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue