Botan
1.10.9
|
#include <cvc_ado.h>
Public Member Functions | |
SecureVector< byte > | BER_encode () const |
bool | check_signature (class Public_Key &key) const |
bool | check_signature (class Public_Key &key, const MemoryRegion< byte > &sig) const |
EAC1_1_ADO (const std::string &str) | |
EAC1_1_ADO (DataSource &source) | |
void | encode (Pipe &out, X509_Encoding encoding) const |
ASN1_Car | get_car () const |
SecureVector< byte > | get_concat_sig () const |
EAC1_1_Req | get_request () const |
bool | operator== (EAC1_1_ADO const &rhs) const |
std::string | PEM_encode () const |
AlgorithmIdentifier | signature_algorithm () const |
SecureVector< byte > | tbs_data () const |
virtual | ~EAC1_1_ADO () |
Static Public Member Functions | |
static MemoryVector< byte > | make_signed (PK_Signer &signer, const MemoryRegion< byte > &tbs_bits, RandomNumberGenerator &rng) |
Protected Member Functions | |
void | do_decode () |
void | init (DataSource &in) |
Protected Attributes | |
ECDSA_Signature | m_sig |
std::string | PEM_label_pref |
std::vector< std::string > | PEM_labels_allowed |
AlgorithmIdentifier | sig_algo |
SecureVector< byte > | tbs_bits |
Friends | |
class | EAC1_1_obj< EAC1_1_ADO > |
Botan::EAC1_1_ADO::EAC1_1_ADO | ( | const std::string & | str | ) |
Construct a CVC ADO request from a DER encoded CVC ADO request file.
str | the path to the DER encoded file |
Definition at line 20 of file cvc_ado.cpp.
References Botan::EAC_Signed_Object::do_decode(), and Botan::EAC1_1_obj< EAC1_1_ADO >::init().
Botan::EAC1_1_ADO::EAC1_1_ADO | ( | DataSource & | source | ) |
Construct a CVC ADO request from a data source
source | the data source |
Definition at line 14 of file cvc_ado.cpp.
References Botan::EAC_Signed_Object::do_decode(), and Botan::EAC1_1_obj< EAC1_1_ADO >::init().
|
inlinevirtual |
|
inherited |
BER encode this object.
Definition at line 19 of file signed_obj.cpp.
References Botan::EAC_Signed_Object::encode(), Botan::Pipe::end_msg(), Botan::RAW_BER, Botan::Pipe::read_all(), and Botan::Pipe::start_msg().
Referenced by Botan::CVC_EAC::create_ado_req().
|
inlineinherited |
Definition at line 30 of file eac_obj.h.
|
inherited |
Check the signature of this object.
key | the public key associated with this signed object |
sig | the signature we are checking |
Definition at line 48 of file signed_obj.cpp.
References Botan::Public_Key::algo_name(), Botan::DER_SEQUENCE, Botan::IEEE_1363, Botan::OIDS::lookup(), Botan::Public_Key::message_parts(), Botan::AlgorithmIdentifier::oid, Botan::EAC_Signed_Object::sig_algo, Botan::split_on(), Botan::EAC_Signed_Object::tbs_data(), and Botan::PK_Verifier::verify_message().
Referenced by Botan::EAC1_1_obj< EAC1_1_Req >::check_signature().
|
protectedinherited |
Definition at line 79 of file signed_obj.cpp.
References Botan::EAC_Signed_Object::PEM_label_pref.
Referenced by EAC1_1_ADO(), Botan::EAC1_1_CVC::EAC1_1_CVC(), and Botan::EAC1_1_Req::EAC1_1_Req().
|
virtual |
Encode this object into a pipe. Only DER is supported.
out | the pipe to encode this object into |
encoding | the encoding type to use, must be DER |
Implements Botan::EAC_Signed_Object.
Definition at line 95 of file cvc_ado.cpp.
References Botan::APPLICATION, Botan::OCTET_STRING, Botan::PEM, Botan::EAC_Signed_Object::tbs_bits, and Botan::Pipe::write().
ASN1_Car Botan::EAC1_1_ADO::get_car | ( | ) | const |
Get the CAR of this CVC ADO request
Definition at line 62 of file cvc_ado.cpp.
Referenced by operator==().
|
inlinevirtualinherited |
Return the signature as a concatenation of the encoded parts.
Implements Botan::EAC_Signed_Object.
Definition at line 27 of file eac_obj.h.
Referenced by operator==().
EAC1_1_Req Botan::EAC1_1_ADO::get_request | ( | ) | const |
Get the CVC request contained in this object.
Definition at line 123 of file cvc_ado.cpp.
|
inlineprotectedinherited |
|
static |
Create a signed CVC ADO request from to be signed (TBS) data
signer | the signer used to sign the CVC ADO request |
tbs_bits | the TBS data to sign |
rng | a random number generator |
Definition at line 48 of file cvc_ado.cpp.
References Botan::APPLICATION, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents(), Botan::OCTET_STRING, Botan::DER_Encoder::raw_bytes(), Botan::PK_Signer::sign_message(), and Botan::DER_Encoder::start_cons().
Referenced by Botan::CVC_EAC::create_ado_req().
bool Botan::EAC1_1_ADO::operator== | ( | EAC1_1_ADO const & | rhs | ) | const |
Definition at line 116 of file cvc_ado.cpp.
References get_car(), Botan::EAC1_1_obj< Derived >::get_concat_sig(), Botan::EAC1_1_obj< EAC1_1_ADO >::get_concat_sig(), and tbs_data().
|
inherited |
PEM encode this object.
Definition at line 31 of file signed_obj.cpp.
References Botan::EAC_Signed_Object::encode(), Botan::Pipe::end_msg(), Botan::PEM, Botan::Pipe::read_all_as_string(), and Botan::Pipe::start_msg().
|
inherited |
Get the signature algorithm identifier used to sign this object.
Definition at line 43 of file signed_obj.cpp.
References Botan::EAC_Signed_Object::sig_algo.
Referenced by Botan::CVC_EAC::create_ado_req(), Botan::DE_EAC::link_cvca(), and Botan::DE_EAC::sign_request().
|
virtual |
Get the TBS data of this CVC ADO request.
Implements Botan::EAC_Signed_Object.
Definition at line 111 of file cvc_ado.cpp.
References Botan::EAC_Signed_Object::tbs_bits.
Referenced by operator==().
|
friend |
|
protectedinherited |
|
protectedinherited |
Definition at line 87 of file signed_obj.h.
Referenced by Botan::EAC_Signed_Object::do_decode(), and Botan::EAC1_1_obj< EAC1_1_Req >::init().
|
protectedinherited |
Definition at line 88 of file signed_obj.h.
|
protectedinherited |
Definition at line 85 of file signed_obj.h.
Referenced by Botan::EAC_Signed_Object::check_signature(), and Botan::EAC_Signed_Object::signature_algorithm().
|
protectedinherited |
Definition at line 86 of file signed_obj.h.
Referenced by encode(), Botan::EAC1_1_obj< EAC1_1_Req >::init(), and tbs_data().