Botan
1.10.9
|
#include <pkcs10.h>
Public Member Functions | |
MemoryVector< byte > | BER_encode () const |
std::string | challenge_password () const |
bool | check_signature (class Public_Key &key) const |
bool | check_signature (class Public_Key *key) const |
Key_Constraints | constraints () const |
void | encode (Pipe &out, X509_Encoding encoding=PEM) const |
std::vector< OID > | ex_constraints () const |
std::string | hash_used_for_signature () const |
bool | is_CA () const |
u32bit | path_limit () const |
std::string | PEM_encode () const |
PKCS10_Request (DataSource &source) | |
PKCS10_Request (const std::string &filename) | |
MemoryVector< byte > | raw_public_key () const |
MemoryVector< byte > | signature () const |
AlgorithmIdentifier | signature_algorithm () const |
AlternativeName | subject_alt_name () const |
X509_DN | subject_dn () const |
Public_Key * | subject_public_key () const |
MemoryVector< byte > | tbs_data () const |
Static Public Member Functions | |
static MemoryVector< byte > | make_signed (class PK_Signer *signer, RandomNumberGenerator &rng, const AlgorithmIdentifier &alg_id, const MemoryRegion< byte > &tbs) |
Protected Member Functions | |
void | do_decode () |
Protected Attributes | |
MemoryVector< byte > | sig |
AlgorithmIdentifier | sig_algo |
MemoryVector< byte > | tbs_bits |
PKCS #10 Certificate Request.
Botan::PKCS10_Request::PKCS10_Request | ( | DataSource & | source | ) |
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().
Botan::PKCS10_Request::PKCS10_Request | ( | const std::string & | filename | ) |
Create a PKCS#10 Request from a file.
filename | the name of the file containing the DER or PEM encoded request file |
Definition at line 31 of file pkcs10.cpp.
References Botan::X509_Object::do_decode().
|
inherited |
Definition at line 100 of file x509_obj.cpp.
References Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents(), Botan::DER_Encoder::raw_bytes(), Botan::SEQUENCE, Botan::X509_Object::sig, Botan::X509_Object::sig_algo, Botan::DER_Encoder::start_cons(), and Botan::X509_Object::tbs_bits.
Referenced by Botan::X509_Object::encode(), Botan::X509_Object::PEM_encode(), and Botan::CMS_Encoder::sign().
std::string Botan::PKCS10_Request::challenge_password | ( | ) | const |
Get the challenge password for this request
Definition at line 123 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 178 of file x509_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::X509_Object::sig_algo, 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 169 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 165 of file pkcs10.cpp.
References Botan::Data_Store::get1_u32bit(), and Botan::NO_CONSTRAINTS.
Referenced by Botan::X509_CA::sign_request().
|
protectedinherited |
Definition at line 221 of file x509_obj.cpp.
Referenced by PKCS10_Request(), Botan::X509_Certificate::X509_Certificate(), and Botan::X509_CRL::X509_CRL().
|
inherited |
Encode this to a pipe
out | the pipe to write to |
encoding | the encoding to use |
Definition at line 89 of file x509_obj.cpp.
References Botan::X509_Object::BER_encode(), Botan::PEM, Botan::X509_Object::PEM_encode(), and Botan::Pipe::write().
std::vector< OID > Botan::PKCS10_Request::ex_constraints | ( | ) | const |
Get the extendend key constraints (if any).
Definition at line 173 of file pkcs10.cpp.
References Botan::Data_Store::get().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 148 of file x509_obj.cpp.
References Botan::OID::as_string(), Botan::OIDS::lookup(), Botan::AlgorithmIdentifier::oid, Botan::parse_algorithm_name(), Botan::X509_Object::sig_algo, and Botan::split_on().
bool Botan::PKCS10_Request::is_CA | ( | ) | const |
Find out whether this is a CA request.
Definition at line 186 of file pkcs10.cpp.
References Botan::Data_Store::get1_u32bit().
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 204 of file x509_obj.cpp.
References Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::get_contents(), 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().
u32bit Botan::PKCS10_Request::path_limit | ( | ) | const |
Return the constraint on the path length defined in the BasicConstraints extension.
Definition at line 194 of file pkcs10.cpp.
References Botan::Data_Store::get1_u32bit().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 116 of file x509_obj.cpp.
References Botan::X509_Object::BER_encode(), and Botan::PEM_Code::encode().
Referenced by Botan::X509_Object::encode().
MemoryVector< byte > Botan::PKCS10_Request::raw_public_key | ( | ) | const |
Get the raw DER encoded public key.
Definition at line 139 of file pkcs10.cpp.
References Botan::PEM_Code::decode_check_label(), and Botan::Data_Store::get1().
Referenced by Botan::X509_CA::sign_request().
|
inherited |
Definition at line 132 of file x509_obj.cpp.
References Botan::X509_Object::sig.
Referenced by Botan::X509_Object::check_signature().
|
inherited |
Definition at line 140 of file x509_obj.cpp.
References Botan::X509_Object::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 157 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 131 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 148 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 124 of file x509_obj.cpp.
References Botan::ASN1::put_in_sequence(), and Botan::X509_Object::tbs_bits.
Referenced by Botan::X509_Object::check_signature().
|
protectedinherited |
Definition at line 102 of file x509_obj.h.
Referenced by Botan::X509_Object::BER_encode(), Botan::X509_Certificate::operator==(), and Botan::X509_Object::signature().
|
protectedinherited |
Definition at line 101 of file x509_obj.h.
Referenced by Botan::X509_Object::BER_encode(), Botan::X509_Object::check_signature(), Botan::X509_Object::hash_used_for_signature(), Botan::X509_Certificate::operator==(), and Botan::X509_Object::signature_algorithm().
|
protectedinherited |
Definition at line 102 of file x509_obj.h.
Referenced by Botan::X509_Object::BER_encode(), and Botan::X509_Object::tbs_data().