Botan
2.1.0
Crypto and TLS for C++11
|
#include <pkcs10.h>
Public Member Functions | |
std::vector< uint8_t > | BER_encode () const |
std::string | challenge_password () const |
bool | check_signature (const Public_Key &key) const |
bool | check_signature (const Public_Key *key) const |
Key_Constraints | constraints () const |
void | decode_from (class BER_Decoder &from) override |
void | encode_into (class DER_Encoder &to) const override |
std::vector< OID > | ex_constraints () const |
Extensions | extensions () const |
std::string | hash_used_for_signature () const |
bool | is_CA () const |
size_t | path_limit () const |
std::string | PEM_encode () const |
PKCS10_Request (DataSource &source) | |
PKCS10_Request (const std::vector< uint8_t > &vec) | |
std::vector< uint8_t > | raw_public_key () const |
std::vector< uint8_t > | signature () const |
AlgorithmIdentifier | signature_algorithm () const |
AlternativeName | subject_alt_name () const |
X509_DN | subject_dn () const |
Public_Key * | subject_public_key () const |
std::vector< uint8_t > | tbs_data () const |
Static Public Member Functions | |
static std::vector< uint8_t > | make_signed (class PK_Signer *signer, RandomNumberGenerator &rng, const AlgorithmIdentifier &alg_id, const secure_vector< uint8_t > &tbs) |
Protected Member Functions | |
void | do_decode () |
Protected Attributes | |
std::vector< uint8_t > | m_sig |
AlgorithmIdentifier | m_sig_algo |
std::vector< uint8_t > | m_tbs_bits |
|
explicit |
Create a PKCS#10 Request from a data source.
source | the data source providing the DER encoded request |
Definition at line 22 of file pkcs10.cpp.
References Botan::X509_Object::do_decode().
|
explicit |
Create a PKCS#10 Request from binary data.
vec | a std::vector containing the DER value |
Definition at line 42 of file pkcs10.cpp.
References Botan::X509_Object::do_decode().
|
inherited |
Definition at line 114 of file x509_obj.cpp.
References Botan::X509_Object::encode_into(), and Botan::DER_Encoder::get_contents_unlocked().
Referenced by Botan::X509_Certificate::fingerprint(), and Botan::X509_Object::PEM_encode().
std::string Botan::PKCS10_Request::challenge_password | ( | ) | const |
Get the challenge password for this request
Definition at line 130 of file pkcs10.cpp.
References Botan::Data_Store::get1().
|
inherited |
Check the signature on this data
key | the public key purportedly used to sign this data |
Definition at line 188 of file x509_obj.cpp.
References Botan::Public_Key::algo_name(), Botan::DER_SEQUENCE, Botan::IEEE_1363, Botan::OIDS::lookup(), Botan::X509_Object::m_sig_algo, Botan::Public_Key::message_parts(), Botan::AlgorithmIdentifier::oid, Botan::X509_Object::signature(), Botan::split_on(), Botan::X509_Object::tbs_data(), and Botan::PK_Verifier::verify_message().
Referenced by Botan::X509_Object::check_signature().
|
inherited |
Check the signature on this data
key | the public key purportedly used to sign this data the pointer will be deleted after use |
Definition at line 177 of file x509_obj.cpp.
References Botan::X509_Object::check_signature().
Key_Constraints Botan::PKCS10_Request::constraints | ( | ) | const |
Get the key constraints for the key associated with this PKCS#10 object.
Definition at line 172 of file pkcs10.cpp.
References Botan::Extensions::get(), Botan::Cert_Extension::Key_Usage::get_constraints(), Botan::OIDS::lookup(), and Botan::NO_CONSTRAINTS.
Referenced by Botan::X509_CA::sign_request().
|
overridevirtualinherited |
Decode a BER encoded X509_Object See ASN1_Object::decode_from()
Implements Botan::ASN1_Object.
Definition at line 100 of file x509_obj.cpp.
References Botan::BIT_STRING, Botan::BER_Decoder::decode(), Botan::BER_Decoder::end_cons(), Botan::X509_Object::m_sig, Botan::X509_Object::m_sig_algo, Botan::X509_Object::m_tbs_bits, Botan::BER_Decoder::raw_bytes(), Botan::SEQUENCE, and Botan::BER_Decoder::start_cons().
|
protectedinherited |
Definition at line 231 of file x509_obj.cpp.
References Botan::Exception::what().
Referenced by PKCS10_Request(), Botan::X509_Certificate::X509_Certificate(), and Botan::X509_CRL::X509_CRL().
|
overridevirtualinherited |
DER encode an X509_Object See ASN1_Object::encode_into()
Implements Botan::ASN1_Object.
Definition at line 86 of file x509_obj.cpp.
References Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::X509_Object::m_sig, Botan::X509_Object::m_sig_algo, Botan::X509_Object::m_tbs_bits, Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, and Botan::DER_Encoder::start_cons().
Referenced by Botan::X509_Object::BER_encode(), and Botan::Certificate_Store_In_SQL::insert_cert().
std::vector< OID > Botan::PKCS10_Request::ex_constraints | ( | ) | const |
Get the extendend key constraints (if any).
Definition at line 185 of file pkcs10.cpp.
References Botan::Extensions::get(), Botan::Cert_Extension::Extended_Key_Usage::get_oids(), and Botan::OIDS::lookup().
Referenced by Botan::X509_CA::sign_request().
Extensions Botan::PKCS10_Request::extensions | ( | ) | const |
Get the X509v3 extensions.
Definition at line 228 of file pkcs10.cpp.
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 156 of file x509_obj.cpp.
References Botan::OID::as_string(), Botan::OIDS::lookup(), Botan::X509_Object::m_sig_algo, Botan::AlgorithmIdentifier::oid, Botan::parse_algorithm_name(), and Botan::split_on().
bool Botan::PKCS10_Request::is_CA | ( | ) | const |
Find out whether this is a CA request.
Definition at line 198 of file pkcs10.cpp.
References Botan::Extensions::get(), Botan::Cert_Extension::Basic_Constraints::get_is_ca(), and Botan::OIDS::lookup().
Referenced by Botan::X509_CA::sign_request().
|
staticinherited |
Create a signed X509 object.
signer | the signer used to sign the object |
rng | the random number generator to use |
alg_id | the algorithm identifier of the signature scheme |
tbs | the tbs bits to be signed |
Definition at line 214 of file x509_obj.cpp.
References Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::get_contents_unlocked(), Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, Botan::PK_Signer::sign_message(), and Botan::DER_Encoder::start_cons().
Referenced by Botan::X509::create_cert_req(), and Botan::X509_CA::make_cert().
size_t Botan::PKCS10_Request::path_limit | ( | ) | const |
Return the constraint on the path length defined in the BasicConstraints extension.
Definition at line 211 of file pkcs10.cpp.
References Botan::Extensions::get(), Botan::Cert_Extension::Basic_Constraints::get_is_ca(), Botan::Cert_Extension::Basic_Constraints::get_path_limit(), and Botan::OIDS::lookup().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 124 of file x509_obj.cpp.
References Botan::X509_Object::BER_encode(), and Botan::PEM_Code::encode().
std::vector< uint8_t > Botan::PKCS10_Request::raw_public_key | ( | ) | const |
Get the raw DER encoded public key.
Definition at line 146 of file pkcs10.cpp.
References Botan::PEM_Code::decode_check_label(), Botan::Data_Store::get1(), and Botan::unlock().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 140 of file x509_obj.cpp.
References Botan::X509_Object::m_sig.
Referenced by Botan::X509_Object::check_signature().
|
inherited |
Definition at line 148 of file x509_obj.cpp.
References Botan::X509_Object::m_sig_algo.
Referenced by Botan::X509_Certificate::to_string().
AlternativeName Botan::PKCS10_Request::subject_alt_name | ( | ) | const |
Get the subject alternative name.
Definition at line 164 of file pkcs10.cpp.
References Botan::create_alt_name().
Referenced by Botan::X509_CA::sign_request().
X509_DN Botan::PKCS10_Request::subject_dn | ( | ) | const |
Get the subject DN.
Definition at line 138 of file pkcs10.cpp.
References Botan::create_dn().
Referenced by Botan::X509_CA::sign_request().
Public_Key * Botan::PKCS10_Request::subject_public_key | ( | ) | const |
Get the subject public key.
Definition at line 155 of file pkcs10.cpp.
References Botan::Data_Store::get1(), and Botan::X509::load_key().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
The underlying data that is to be or was signed
Definition at line 132 of file x509_obj.cpp.
References Botan::X509_Object::m_tbs_bits, and Botan::ASN1::put_in_sequence().
Referenced by Botan::X509_Object::check_signature().
|
protectedinherited |
Definition at line 110 of file x509_obj.h.
Referenced by Botan::X509_Object::decode_from(), Botan::X509_Object::encode_into(), Botan::X509_Certificate::operator<(), Botan::X509_Certificate::operator==(), and Botan::X509_Object::signature().
|
protectedinherited |
|
protectedinherited |
Definition at line 110 of file x509_obj.h.
Referenced by Botan::X509_Object::decode_from(), Botan::X509_Object::encode_into(), Botan::X509_Certificate::operator<(), and Botan::X509_Object::tbs_data().