8#include <botan/x509_key.h>
9#include <botan/filters.h>
10#include <botan/asn1_obj.h>
11#include <botan/der_enc.h>
12#include <botan/ber_dec.h>
14#include <botan/internal/pk_algs.h>
116 const std::string name = pub_key.
algo_name();
118 size_t constraints = 0;
120 if(name ==
"DH" || name ==
"ECDH")
123 if(name ==
"RSA" || name ==
"ElGamal")
126 if(name ==
"RSA" || name ==
"RW" || name ==
"NR" ||
127 name ==
"DSA" || name ==
"ECDSA")
131 constraints &= limits;
BER_Decoder(DataSource &)
DER_Encoder & start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag=UNIVERSAL)
SecureVector< byte > get_contents()
DER_Encoder & encode(bool b)
virtual MemoryVector< byte > x509_subject_public_key() const =0
virtual AlgorithmIdentifier algorithm_identifier() const =0
virtual std::string algo_name() const =0
bool maybe_BER(DataSource &source)
std::string encode(const byte der[], size_t length, const std::string &label, size_t width)
SecureVector< byte > decode_check_label(DataSource &source, const std::string &label_want)
bool matches(DataSource &source, const std::string &extra, size_t search_range)
std::string PEM_encode(const Public_Key &key)
MemoryVector< byte > BER_encode(const Public_Key &key)
Public_Key * copy_key(const Public_Key &key)
Public_Key * load_key(DataSource &source)
Key_Constraints find_constraints(const Public_Key &pub_key, Key_Constraints limits)
Public_Key * make_public_key(const AlgorithmIdentifier &alg_id, const MemoryRegion< byte > &key_bits)
Decoding_Error(const std::string &name)