DoxigAlpha

verify

Function parameters

Parameters

#
subject:Certificate.Parsed
now_sec:i64

Functions in this namespace

Functions

#
find
The returned bytes become invalid after calling any of the rescan functions
rescan
Clears the set of certificates and then scans the host operating system

Error sets in this namespace

Error Sets

#

Source

Implementation

#
pub fn verify(cb: Bundle, subject: Certificate.Parsed, now_sec: i64) VerifyError!void {
    const bytes_index = cb.find(subject.issuer()) orelse return error.CertificateIssuerNotFound;
    const issuer_cert: Certificate = .{
        .buffer = cb.bytes.items,
        .index = bytes_index,
    };
    // Every certificate in the bundle is pre-parsed before adding it, ensuring
    // that parsing will succeed here.
    const issuer = issuer_cert.parse() catch unreachable;
    try subject.verify(issuer, now_sec);
}