userver: crypto::Certificate Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts

#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
inlinenoexcept

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.

Exceptions
crypto::SerializationErrorif serialization fails.

◆ LoadFromString()

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

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

Exceptions
crypto::KeyParseErrorif failed to load the certificate.

◆ operator bool()

crypto::Certificate::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 27 of file certificate.hpp.


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