userver: crypto::Certificate Class Reference
No Matches
crypto::Certificate Class Reference

#include <userver/crypto/certificate.hpp>

Detailed Description

Loaded into memory X509 certificate

Definition at line 20 of file certificate.hpp.

Public Types

using NativeType = X509

Public Member Functions

NativeType * GetNative () const noexcept
 operator bool () const noexcept
std::optional< std::string > GetPemString () const

Static Public Member Functions

static Certificate LoadFromString (std::string_view certificate)

Member Typedef Documentation

◆ NativeType

using crypto::Certificate::NativeType = X509

Definition at line 22 of file certificate.hpp.

Member Function Documentation

◆ GetNative()

NativeType * crypto::Certificate::GetNative ( ) const

Definition at line 26 of file certificate.hpp.

◆ GetPemString()

std::optional< std::string > crypto::Certificate::GetPemString ( ) const

Returns a PEM-encoded representation of stored certificate.

crypto::SerializationErrorif serialization fails.

◆ LoadFromString()

static Certificate crypto::Certificate::LoadFromString ( std::string_view certificate)

Accepts a string that contains a certificate, checks that it's correct, loads it into OpenSSL structures and returns as a Certificate variable.

crypto::KeyParseErrorif failed to load the certificate.

◆ operator bool()

crypto::Certificate::operator bool ( ) const

Definition at line 27 of file certificate.hpp.

The documentation for this class was generated from the following file: