userver: crypto::CmsSigner Class Reference
Loading...
Searching...
No Matches
crypto::CmsSigner Class Referencefinal

Detailed Description

Definition at line 114 of file signers.hpp.

+ Inheritance diagram for crypto::CmsSigner:
+ Collaboration diagram for crypto::CmsSigner:

Public Types

enum class  Flags {
  kNone = 0x0 ,
  kText = 0x1 ,
  kNoCerts = 0x2 ,
  kDetached = 0x40 ,
  kBinary = 0x80
}
 Signer flags. More...
 
enum class  OutForm {
  kDer ,
  kPem ,
  kSMime
}
 Output encoding. More...
 

Public Member Functions

 CmsSigner (Certificate certificate, PrivateKey pkey)
 Construct from certificate and private key.
 
std::string Sign (std::initializer_list< std::string_view > data, utils::Flags< Flags > flags, OutForm out_form) const
 Signs a raw message, returning as specified by flags.
 
- Public Member Functions inherited from crypto::NamedAlgo
 NamedAlgo (std::string name)
 
const std::string & Name () const
 

Member Enumeration Documentation

◆ Flags

enum class crypto::CmsSigner::Flags
strong

Signer flags.

Enumerator
kText 

If set MIME headers for type text/plain are prepended to the data.

kNoCerts 

If set the signer's certificate will not be included in the resulting CMS structure. This can reduce the size of the signature if the signers certificate can be obtained by other means: for example a previously signed message.

kDetached 

If set data being signed is omitted from the resulting CMS structure.

kBinary 

Normally the supplied content is translated into MIME canonical format (as required by the S/MIME specifications). If set no translation occurs.

Definition at line 117 of file signers.hpp.

◆ OutForm

enum class crypto::CmsSigner::OutForm
strong

Output encoding.

Definition at line 135 of file signers.hpp.


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