retdec
Private Types | Private Attributes | List of all members
retdec::fileformat::CertificateTable Class Reference

#include <certificate_table.h>

Collaboration diagram for retdec::fileformat::CertificateTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfCertificates () const
 
std::size_t getSignerCertificateIndex () const
 
std::size_t getCounterSignerCertificateIndex () const
 
const CertificategetCertificate (std::size_t certIndex) const
 
Setters
void setSignerCertificateIndex (std::size_t certIndex)
 
void setCounterSignerCertificateIndex (std::size_t certIndex)
 
Iterators
certificatesIterator begin () const
 
certificatesIterator end () const
 
Other methods
bool hasSignerCertificate () const
 
bool hasCounterSignerCertificate () const
 
void addCertificate (const Certificate &certificate)
 
bool empty () const
 

Private Types

using certificatesIterator = std::vector< Certificate >::const_iterator
 

Private Attributes

bool hasSigner = false
 flag indicating whether signer is present More...
 
bool hasCounterSigner = false
 flag indicating whether counter signer is present More...
 
std::size_t signerIndex = 0
 index of certificate of the signer More...
 
std::size_t counterSignerIndex = 0
 index of certificate of the counter-signer More...
 
std::vector< Certificatecertificates
 stored certificates More...
 

Detailed Description

Table of certificates

Member Typedef Documentation

◆ certificatesIterator

using retdec::fileformat::CertificateTable::certificatesIterator = std::vector<Certificate>::const_iterator
private

Member Function Documentation

◆ addCertificate()

void retdec::fileformat::CertificateTable::addCertificate ( const Certificate certificate)

Add certificate

Parameters
certificateCertificate which will be added

◆ begin()

CertificateTable::certificatesIterator retdec::fileformat::CertificateTable::begin ( ) const

Get begin certificates iterator

Returns
Begin certificates iterator

◆ empty()

bool retdec::fileformat::CertificateTable::empty ( ) const

Check if certificate table is empty

Returns
true if table does not contain any certificates, false otherwise

◆ end()

CertificateTable::certificatesIterator retdec::fileformat::CertificateTable::end ( ) const

Get end certificates iterator

Returns
End certificates iterator

◆ getCertificate()

const Certificate * retdec::fileformat::CertificateTable::getCertificate ( std::size_t  certIndex) const

Get selected certificate

Parameters
certIndexIndex of selected certificate (indexed from 0)
Returns
Pointer to selected certificate or nullptr if certificate index is invalid

◆ getCounterSignerCertificateIndex()

std::size_t retdec::fileformat::CertificateTable::getCounterSignerCertificateIndex ( ) const

Get index of the certificate of the counter-signer. Returned value should not be used without prior checking of whether the table has counter-signer certificate.

Returns
Index of the counter-signer's certificate

◆ getNumberOfCertificates()

std::size_t retdec::fileformat::CertificateTable::getNumberOfCertificates ( ) const

Get number of certificates

Returns
Number of certificates

◆ getSignerCertificateIndex()

std::size_t retdec::fileformat::CertificateTable::getSignerCertificateIndex ( ) const

Get index of the certificate of the signer

Returns
Index of the signer's certificate

◆ hasCounterSignerCertificate()

bool retdec::fileformat::CertificateTable::hasCounterSignerCertificate ( ) const

Get whether certificate table has counter-signer certificate

Returns
true if has counter-signer, otherwise false.

◆ hasSignerCertificate()

bool retdec::fileformat::CertificateTable::hasSignerCertificate ( ) const

Get whether certificate table has signer certificate

Returns
true if has signer, otherwise false.

◆ setCounterSignerCertificateIndex()

void retdec::fileformat::CertificateTable::setCounterSignerCertificateIndex ( std::size_t  certIndex)

Set counter-signer certificate index

Parameters
certIndexIndex of the counter-signer certificate

◆ setSignerCertificateIndex()

void retdec::fileformat::CertificateTable::setSignerCertificateIndex ( std::size_t  certIndex)

Set signer certificate index

Parameters
certIndexIndex of the signer certificate

Member Data Documentation

◆ certificates

std::vector<Certificate> retdec::fileformat::CertificateTable::certificates
private

stored certificates

◆ counterSignerIndex

std::size_t retdec::fileformat::CertificateTable::counterSignerIndex = 0
private

index of certificate of the counter-signer

◆ hasCounterSigner

bool retdec::fileformat::CertificateTable::hasCounterSigner = false
private

flag indicating whether counter signer is present

◆ hasSigner

bool retdec::fileformat::CertificateTable::hasSigner = false
private

flag indicating whether signer is present

◆ signerIndex

std::size_t retdec::fileformat::CertificateTable::signerIndex = 0
private

index of certificate of the signer


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