Coverage Report

Created: 2025-06-24 07:14

/src/zeek/src/file_analysis/analyzer/x509/Plugin.cc
Line
Count
Source (jump to first uncovered line)
1
// See the file "COPYING" in the main distribution directory for copyright.
2
3
#include "zeek/plugin/Plugin.h"
4
5
#include "zeek/file_analysis/Component.h"
6
#include "zeek/file_analysis/analyzer/x509/OCSP.h"
7
#include "zeek/file_analysis/analyzer/x509/X509.h"
8
9
namespace zeek::plugin::detail::Zeek_X509 {
10
11
class Plugin : public zeek::plugin::Plugin {
12
public:
13
66
    zeek::plugin::Configuration Configure() override {
14
66
        AddComponent(new zeek::file_analysis::Component("X509", zeek::file_analysis::detail::X509::Instantiate));
15
66
        AddComponent(
16
66
            new zeek::file_analysis::Component("OCSP_REQUEST", zeek::file_analysis::detail::OCSP::InstantiateRequest));
17
66
        AddComponent(
18
66
            new zeek::file_analysis::Component("OCSP_REPLY", zeek::file_analysis::detail::OCSP::InstantiateReply));
19
20
66
        zeek::plugin::Configuration config;
21
66
        config.name = "Zeek::X509";
22
66
        config.description = "X509 and OCSP analyzer";
23
66
        return config;
24
66
    }
25
26
0
    void Done() override {
27
0
        zeek::plugin::Plugin::Done();
28
0
        zeek::file_analysis::detail::X509::FreeRootStore();
29
0
    }
30
} plugin;
31
32
} // namespace zeek::plugin::detail::Zeek_X509