diff options
author | lloyd <[email protected]> | 2012-06-01 04:59:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-06-01 04:59:27 +0000 |
commit | a597c5ac36f012f76814fcfc1523d956871c0c0c (patch) | |
tree | b2003fc6a5a5d0d228ab966e0da84d89d5dc9db3 /src | |
parent | 63defdde855dca51d5db405cb97d9b7c9ba09332 (diff) |
Drop some deprecated functions
Diffstat (limited to 'src')
-rw-r--r-- | src/cert/x509/x509_obj.cpp | 11 | ||||
-rw-r--r-- | src/cert/x509/x509_obj.h | 9 | ||||
-rw-r--r-- | src/libstate/info.txt | 1 | ||||
-rw-r--r-- | src/libstate/look_pk.h | 97 | ||||
-rw-r--r-- | src/libstate/lookup.cpp | 57 | ||||
-rw-r--r-- | src/libstate/lookup.h | 30 | ||||
-rw-r--r-- | src/pubkey/x509_key.h | 19 |
7 files changed, 0 insertions, 224 deletions
diff --git a/src/cert/x509/x509_obj.cpp b/src/cert/x509/x509_obj.cpp index ff116d894..37d814ce6 100644 --- a/src/cert/x509/x509_obj.cpp +++ b/src/cert/x509/x509_obj.cpp @@ -109,17 +109,6 @@ void X509_Object::decode_from(BER_Decoder& from) } /* -* Return a BER or PEM encoded X.509 object -*/ -void X509_Object::encode(Pipe& out, X509_Encoding encoding) const - { - if(encoding == PEM) - out.write(this->PEM_encode()); - else - out.write(this->BER_encode()); - } - -/* * Return a BER encoded X.509 object */ std::vector<byte> X509_Object::BER_encode() const diff --git a/src/cert/x509/x509_obj.h b/src/cert/x509/x509_obj.h index 75a0b5c02..5905e1b37 100644 --- a/src/cert/x509/x509_obj.h +++ b/src/cert/x509/x509_obj.h @@ -86,15 +86,6 @@ class BOTAN_DLL X509_Object : public ASN1_Object */ std::string PEM_encode() const; - /** - * Encode this to a pipe - * @deprecated use BER_encode or PEM_encode instead - * @param out the pipe to write to - * @param encoding the encoding to use - */ - BOTAN_DEPRECATED("Use BER_encode or PEM_encode") - void encode(Pipe& out, X509_Encoding encoding = PEM) const; - virtual ~X509_Object() {} protected: X509_Object(DataSource& src, const std::string& pem_labels); diff --git a/src/libstate/info.txt b/src/libstate/info.txt index 0e523e601..b0704cd96 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -7,7 +7,6 @@ botan.h global_state.h init.h libstate.h -look_pk.h lookup.h scan_name.h </header:public> diff --git a/src/libstate/look_pk.h b/src/libstate/look_pk.h deleted file mode 100644 index bbd0e7dba..000000000 --- a/src/libstate/look_pk.h +++ /dev/null @@ -1,97 +0,0 @@ -/* -* PK Algorithm Lookup -* (C) 1999-2010 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_PK_LOOKUP_H__ -#define BOTAN_PK_LOOKUP_H__ - -#include <botan/lookup.h> -#include <botan/pubkey.h> - -namespace Botan { - -/** -* Public key encryptor factory method. -* @deprecated Instantiate object from pubkey.h directly -* -* @param key the key that will work inside the encryptor -* @param eme determines the algorithm and encoding -* @return public key encryptor object -*/ -BOTAN_DEPRECATED("Instantiate object directly") -inline PK_Encryptor* get_pk_encryptor(const Public_Key& key, - const std::string& eme) - { - return new PK_Encryptor_EME(key, eme); - } - -/** -* Public key decryptor factory method. -* @deprecated Instantiate object from pubkey.h directly -* -* @param key the key that will work inside the decryptor -* @param eme determines the algorithm and encoding -* @return public key decryptor object -*/ -BOTAN_DEPRECATED("Instantiate object directly") -inline PK_Decryptor* get_pk_decryptor(const Private_Key& key, - const std::string& eme) - { - return new PK_Decryptor_EME(key, eme); - } - -/** -* Public key signer factory method. -* @deprecated Instantiate object from pubkey.h directly -* -* @param key the key that will work inside the signer -* @param emsa determines the algorithm, encoding and hash algorithm -* @param sig_format the signature format to be used -* @return public key signer object -*/ -BOTAN_DEPRECATED("Instantiate object directly") -inline PK_Signer* get_pk_signer(const Private_Key& key, - const std::string& emsa, - Signature_Format sig_format = IEEE_1363) - { - return new PK_Signer(key, emsa, sig_format); - } - -/** -* Public key verifier factory method. -* @deprecated Instantiate object from pubkey.h directly -* -* @param key the key that will work inside the verifier -* @param emsa determines the algorithm, encoding and hash algorithm -* @param sig_format the signature format to be used -* @return public key verifier object -*/ -BOTAN_DEPRECATED("Instantiate object directly") -inline PK_Verifier* get_pk_verifier(const Public_Key& key, - const std::string& emsa, - Signature_Format sig_format = IEEE_1363) - { - return new PK_Verifier(key, emsa, sig_format); - } - -/** -* Public key key agreement factory method. -* @deprecated Instantiate object from pubkey.h directly -* -* @param key the key that will work inside the key agreement -* @param kdf the kdf algorithm to use -* @return key agreement algorithm -*/ -BOTAN_DEPRECATED("Instantiate object directly") -inline PK_Key_Agreement* get_pk_kas(const PK_Key_Agreement_Key& key, - const std::string& kdf) - { - return new PK_Key_Agreement(key, kdf); - } - -} - -#endif diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp index 0d3f33573..24a46e3e9 100644 --- a/src/libstate/lookup.cpp +++ b/src/libstate/lookup.cpp @@ -62,63 +62,6 @@ size_t output_length_of(const std::string& name) } /* -* Query the minimum allowed key length of an algorithm implementation -*/ -size_t min_keylength_of(const std::string& name) - { - Algorithm_Factory& af = global_state().algorithm_factory(); - - if(const BlockCipher* bc = af.prototype_block_cipher(name)) - return bc->key_spec().minimum_keylength(); - - if(const StreamCipher* sc = af.prototype_stream_cipher(name)) - return sc->key_spec().minimum_keylength(); - - if(const MessageAuthenticationCode* mac = af.prototype_mac(name)) - return mac->key_spec().minimum_keylength(); - - throw Algorithm_Not_Found(name); - } - -/* -* Query the maximum allowed keylength of an algorithm implementation -*/ -size_t max_keylength_of(const std::string& name) - { - Algorithm_Factory& af = global_state().algorithm_factory(); - - if(const BlockCipher* bc = af.prototype_block_cipher(name)) - return bc->key_spec().maximum_keylength(); - - if(const StreamCipher* sc = af.prototype_stream_cipher(name)) - return sc->key_spec().maximum_keylength(); - - if(const MessageAuthenticationCode* mac = af.prototype_mac(name)) - return mac->key_spec().maximum_keylength(); - - throw Algorithm_Not_Found(name); - } - -/* -* Query the number of byte a valid key must be a multiple of -*/ -size_t keylength_multiple_of(const std::string& name) - { - Algorithm_Factory& af = global_state().algorithm_factory(); - - if(const BlockCipher* bc = af.prototype_block_cipher(name)) - return bc->key_spec().keylength_multiple(); - - if(const StreamCipher* sc = af.prototype_stream_cipher(name)) - return sc->key_spec().keylength_multiple(); - - if(const MessageAuthenticationCode* mac = af.prototype_mac(name)) - return mac->key_spec().keylength_multiple(); - - throw Algorithm_Not_Found(name); - } - -/* * Get a cipher object */ Keyed_Filter* get_cipher(const std::string& algo_spec, diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h index 96364e1d9..7387a3471 100644 --- a/src/libstate/lookup.h +++ b/src/libstate/lookup.h @@ -299,36 +299,6 @@ BOTAN_DLL size_t block_size_of(const std::string& algo_spec); */ BOTAN_DLL size_t output_length_of(const std::string& algo_spec); -/** -* Find out the minimum key size of a certain symmetric algorithm. -* @deprecated Call algorithm_factory() directly -* -* @param algo_spec the name of the algorithm -* @return minimum key length of the specified algorithm -*/ -BOTAN_DEPRECATED("Retrieve object you want and then call key_spec") -BOTAN_DLL size_t min_keylength_of(const std::string& algo_spec); - -/** -* Find out the maximum key size of a certain symmetric algorithm. -* @deprecated Call algorithm_factory() directly -* -* @param algo_spec the name of the algorithm -* @return maximum key length of the specified algorithm -*/ -BOTAN_DEPRECATED("Retrieve object you want and then call key_spec") -BOTAN_DLL size_t max_keylength_of(const std::string& algo_spec); - -/** -* Find out the size any valid key is a multiple of for a certain algorithm. -* @deprecated Call algorithm_factory() directly -* -* @param algo_spec the name of the algorithm -* @return size any valid key is a multiple of -*/ -BOTAN_DEPRECATED("Retrieve object you want and then call key_spec") -BOTAN_DLL size_t keylength_multiple_of(const std::string& algo_spec); - } #endif diff --git a/src/pubkey/x509_key.h b/src/pubkey/x509_key.h index 4fe11a83f..14e5c9699 100644 --- a/src/pubkey/x509_key.h +++ b/src/pubkey/x509_key.h @@ -67,25 +67,6 @@ BOTAN_DLL Public_Key* load_key(const std::vector<byte>& enc); */ BOTAN_DLL Public_Key* copy_key(const Public_Key& key); -/** -* Encode a key into a pipe. -* @deprecated Use PEM_encode or BER_encode instead -* -* @param key the public key to encode -* @param pipe the pipe to feed the encoded key into -* @param encoding the encoding type to use -*/ -BOTAN_DEPRECATED("Use PEM_encode or BER_encode") -inline void encode(const Public_Key& key, - Pipe& pipe, - X509_Encoding encoding = PEM) - { - if(encoding == PEM) - pipe.write(X509::PEM_encode(key)); - else - pipe.write(X509::BER_encode(key)); - } - } } |