mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Add verify functionality, including the ability to get the validated
chain. This means that it is now possible to get information about the root-certificates that were used to secure a connection. Intermediate commit before changing the script interface again. addresses BIT-953, BIT-760
This commit is contained in:
parent
7ba6bcff2c
commit
a1f2ab34ac
8 changed files with 249 additions and 40 deletions
|
@ -12,12 +12,16 @@
|
|||
|
||||
namespace file_analysis {
|
||||
|
||||
class X509Val;
|
||||
|
||||
class X509 : public file_analysis::Analyzer {
|
||||
public:
|
||||
//~X509();
|
||||
|
||||
static file_analysis::Analyzer* Instantiate(RecordVal* args, File* file)
|
||||
{ return new X509(args, file); }
|
||||
|
||||
static RecordVal* ParseCertificate(X509Val* cert_val);
|
||||
|
||||
virtual bool DeliverStream(const u_char* data, uint64 len);
|
||||
virtual bool Undelivered(uint64 offset, uint64 len);
|
||||
|
@ -31,10 +35,9 @@ private:
|
|||
static StringVal* key_curve(EVP_PKEY *key);
|
||||
static unsigned int key_length(EVP_PKEY *key);
|
||||
|
||||
RecordVal* ParseCertificate(::X509* ssl_cert);
|
||||
void ParseExtension(X509_EXTENSION* ex, RecordVal* r);
|
||||
void ParseBasicConstraints(X509_EXTENSION* ex, RecordVal* r);
|
||||
void ParseSAN(X509_EXTENSION* ex, RecordVal* r);
|
||||
void ParseExtension(X509_EXTENSION* ex, RecordVal* r, X509Val* cert_val);
|
||||
void ParseBasicConstraints(X509_EXTENSION* ex, RecordVal* r, X509Val* cert_val);
|
||||
void ParseSAN(X509_EXTENSION* ex, RecordVal* r, X509Val* cert_val);
|
||||
|
||||
std::string cert_data;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue