8 #include <botan/pkcs10.h>     9 #include <botan/x509_ext.h>    10 #include <botan/x509cert.h>    11 #include <botan/der_enc.h>    12 #include <botan/ber_dec.h>    13 #include <botan/parsing.h>    14 #include <botan/oids.h>    15 #include <botan/pem.h>    23    X509_Object(in, 
"CERTIFICATE REQUEST/NEW CERTIFICATE REQUEST")
    32    X509_Object(in, 
"CERTIFICATE REQUEST/NEW CERTIFICATE REQUEST")
    40 void PKCS10_Request::force_decode()
    45    cert_req_info.
decode(version);
    47       throw Decoding_Error(
"Unknown version code in PKCS #10 request: " +
    51    cert_req_info.
decode(dn_subject);
    57       throw BER_Bad_Tag(
"PKCS10_Request: Unexpected tag for public key",
    60    info.
add(
"X509.Certificate.public_key",
    77          handle_attribute(attr);
    82       throw BER_Bad_Tag(
"PKCS10_Request: Unexpected tag for attributes",
    94 void PKCS10_Request::handle_attribute(
const Attribute& attr)
   107       value.
decode(challenge_password);
   108       info.
add(
"PKCS9.ChallengePassword", challenge_password.
value());
   125    return info.
get1(
"PKCS9.ChallengePassword");
   175    std::vector<std::string> oids = info.
get(
"X509v3.ExtendedKeyUsage");
   177    std::vector<OID> result;
   178    for(
size_t i = 0; i != oids.size(); ++i)
   179       result.push_back(
OID(oids[i]));
   188    return (info.
get1_u32bit(
"X509v3.BasicConstraints.is_ca") > 0);
   196    return info.
get1_u32bit(
"X509v3.BasicConstraints.path_constraint", 0);
 MemoryVector< byte > parameters
MemoryVector< byte > tbs_bits
BER_Decoder & decode(bool &)
Public_Key * load_key(DataSource &source)
AlternativeName subject_alt_name() const
std::string challenge_password() const
bool check_signature(class Public_Key &key) const
X509_DN create_dn(const Data_Store &info)
std::string value() const
std::vector< std::string > get(const std::string &) const
AlternativeName create_alt_name(const Data_Store &info)
std::string lookup(const OID &oid)
Key_Constraints constraints() const
SecureVector< byte > value
void contents_to(Data_Store &, Data_Store &) const
BER_Object get_next_object()
SecureVector< byte > put_in_sequence(const MemoryRegion< byte > &contents)
std::string encode(const byte der[], size_t length, const std::string &label, size_t width)
MemoryVector< byte > raw_public_key() const
BER_Decoder & verify_end()
u32bit path_limit() const
u32bit get1_u32bit(const std::string &, u32bit=0) const
PKCS10_Request(DataSource &source)
std::string to_string(u64bit n, size_t min_len)
X509_DN subject_dn() const
Public_Key * subject_public_key() const
SecureVector< byte > decode_check_label(DataSource &source, const std::string &label_want)
std::multimap< std::string, std::string > contents() const
std::string get1(const std::string &) const
void add(const std::multimap< std::string, std::string > &)
std::vector< OID > ex_constraints() const