scclib
Stable Cloud Computing C++ Library
Public Member Functions | Public Attributes | List of all members
scc::crypto::PublicKeyCert Struct Reference

Public key information certificate. More...

#include <cert.h>

Collaboration diagram for scc::crypto::PublicKeyCert:
Collaboration graph
[legend]

Public Member Functions

KeyAlgoType type () const
 Return the embedded public key type.
 
void parse (const BasePtr)
 Parse from a sequence.
 
void parse (const DerDocument &doc)
 
BasePtr dump () const
 Dump to a sequence.
 
std::string str () const
 Print descriptive string.
 
void get (RsaPublicKey &key) const
 Get rsa public key. More...
 
void set (const RsaPublicKey &key)
 Set rsa public key.
 
void get (EccGfpPoint &) const
 Get ecdsa public key. More...
 
void set (const KeyAlgoType &, const EccGfpPoint &)
 Set ecdsa public key and algorithm. More...
 

Public Attributes

oid_value algorithm_id
 Algorithm id.
 
BasePtr parameters
 The optional parameters (may be null)
 
std::vector< uint8_t > public_key
 The uninterpreted public key.
 

Detailed Description

Public key information certificate.

Defined in X.509.

SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING – DER encoded ASN.1 public key }

AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL }

PEM header is BEGIN PUBLIC KEY (https://tools.ietf.org/html/rfc7468).

Definition at line 104 of file cert.h.

Member Function Documentation

◆ get() [1/2]

void PublicKeyCert::get ( EccGfpPoint key) const

Get ecdsa public key.

Throws exception if not an EC algo, or an invalid point.

Definition at line 194 of file cert.cc.

◆ get() [2/2]

void PublicKeyCert::get ( RsaPublicKey key) const

Get rsa public key.

Throws exception if not an RSA algo, or an invalid key.

Definition at line 172 of file cert.cc.

◆ set()

void PublicKeyCert::set ( const KeyAlgoType algo,
const EccGfpPoint key 
)

Set ecdsa public key and algorithm.

Throws exception if not an EC algo type, or an invalid point.

Definition at line 207 of file cert.cc.


The documentation for this struct was generated from the following files: