Botan
1.10.9
|
#include <signed_obj.h>
Public Member Functions | |
SecureVector< byte > | BER_encode () const |
bool | check_signature (class Public_Key &key, const MemoryRegion< byte > &sig) const |
virtual void | encode (Pipe &pipe, X509_Encoding encoding=PEM) const =0 |
virtual SecureVector< byte > | get_concat_sig () const =0 |
std::string | PEM_encode () const |
AlgorithmIdentifier | signature_algorithm () const |
virtual SecureVector< byte > | tbs_data () const =0 |
virtual | ~EAC_Signed_Object () |
Protected Member Functions | |
void | do_decode () |
EAC_Signed_Object () | |
Protected Attributes | |
std::string | PEM_label_pref |
std::vector< std::string > | PEM_labels_allowed |
AlgorithmIdentifier | sig_algo |
SecureVector< byte > | tbs_bits |
This class represents abstract signed EAC object
Definition at line 22 of file signed_obj.h.
|
inlinevirtual |
Definition at line 80 of file signed_obj.h.
|
inlineprotected |
Definition at line 83 of file signed_obj.h.
SecureVector< byte > Botan::EAC_Signed_Object::BER_encode | ( | ) | const |
BER encode this object.
Definition at line 19 of file signed_obj.cpp.
References 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().
bool Botan::EAC_Signed_Object::check_signature | ( | class Public_Key & | key, |
const MemoryRegion< byte > & | sig | ||
) | const |
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, sig_algo, Botan::split_on(), tbs_data(), and Botan::PK_Verifier::verify_message().
Referenced by Botan::EAC1_1_obj< EAC1_1_Req >::check_signature().
|
protected |
Definition at line 79 of file signed_obj.cpp.
References PEM_label_pref.
Referenced by Botan::EAC1_1_ADO::EAC1_1_ADO(), Botan::EAC1_1_CVC::EAC1_1_CVC(), and Botan::EAC1_1_Req::EAC1_1_Req().
|
pure virtual |
Write this object DER encoded into a specified pipe.
pipe | the pipe to write the encoded object to |
encoding | the encoding type to use |
Implemented in Botan::EAC1_1_ADO, Botan::EAC1_1_gen_CVC< Derived >, Botan::EAC1_1_gen_CVC< EAC1_1_CVC >, and Botan::EAC1_1_gen_CVC< EAC1_1_Req >.
Referenced by BER_encode(), and PEM_encode().
|
pure virtual |
Get the signature of this object as a concatenation, i.e. if the signature consists of multiple parts (like in the case of ECDSA) these will be concatenated.
Implemented in Botan::EAC1_1_obj< Derived >, Botan::EAC1_1_obj< EAC1_1_ADO >, Botan::EAC1_1_obj< EAC1_1_CVC >, and Botan::EAC1_1_obj< EAC1_1_Req >.
std::string Botan::EAC_Signed_Object::PEM_encode | ( | ) | const |
PEM encode this object.
Definition at line 31 of file signed_obj.cpp.
References encode(), Botan::Pipe::end_msg(), Botan::PEM, Botan::Pipe::read_all_as_string(), and Botan::Pipe::start_msg().
AlgorithmIdentifier Botan::EAC_Signed_Object::signature_algorithm | ( | ) | const |
Get the signature algorithm identifier used to sign this object.
Definition at line 43 of file signed_obj.cpp.
References sig_algo.
Referenced by Botan::CVC_EAC::create_ado_req(), Botan::DE_EAC::link_cvca(), and Botan::DE_EAC::sign_request().
|
pure virtual |
Get the TBS (to-be-signed) data in this object.
Implemented in Botan::EAC1_1_ADO, Botan::EAC1_1_gen_CVC< Derived >, Botan::EAC1_1_gen_CVC< EAC1_1_CVC >, and Botan::EAC1_1_gen_CVC< EAC1_1_Req >.
Referenced by check_signature().
|
protected |
Definition at line 87 of file signed_obj.h.
Referenced by do_decode(), and Botan::EAC1_1_obj< EAC1_1_Req >::init().
|
protected |
Definition at line 88 of file signed_obj.h.
|
protected |
Definition at line 85 of file signed_obj.h.
Referenced by check_signature(), and signature_algorithm().
|
protected |
Definition at line 86 of file signed_obj.h.
Referenced by Botan::EAC1_1_ADO::encode(), Botan::EAC1_1_obj< EAC1_1_Req >::init(), and Botan::EAC1_1_ADO::tbs_data().