mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
parse out extension. One event for general extensions (just returns the
openssl-parsed string-value), one event for basicconstraints (is a certificate a CA or not) and one event for subject-alternative-names (only DNS parts).
This commit is contained in:
parent
e5a589dbfe
commit
df552ca87d
9 changed files with 202 additions and 33 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "../File.h"
|
||||
#include "Analyzer.h"
|
||||
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
namespace file_analysis {
|
||||
|
@ -30,6 +31,11 @@ private:
|
|||
static StringVal* key_curve(EVP_PKEY *key);
|
||||
static unsigned int key_length(EVP_PKEY *key);
|
||||
|
||||
void ParseCertificate(::X509* ssl_cert);
|
||||
void ParseExtension(X509_EXTENSION* ex);
|
||||
void ParseBasicConstraints(X509_EXTENSION* ex);
|
||||
void ParseSAN(X509_EXTENSION* ex);
|
||||
|
||||
std::string cert_data;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue