diff options
author | lloyd <[email protected]> | 2010-03-04 04:05:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 04:05:16 +0000 |
commit | 280ed6b255770be9608acbf3afa3e14f5824778a (patch) | |
tree | b5d0fce7f01ca6990299a59dd8cadf16b3b382b1 | |
parent | ea2b48cca1ef37815742577bfd692397bdcf8d13 (diff) |
Remove more load hooks
-rw-r--r-- | src/pubkey/dl_algo/dl_algo.h | 4 | ||||
-rw-r--r-- | src/pubkey/if_algo/if_algo.cpp | 8 | ||||
-rw-r--r-- | src/pubkey/if_algo/if_algo.h | 1 | ||||
-rw-r--r-- | src/pubkey/rsa/rsa.cpp | 2 | ||||
-rw-r--r-- | src/pubkey/rsa/rsa.h | 5 | ||||
-rw-r--r-- | src/pubkey/rw/rw.cpp | 2 | ||||
-rw-r--r-- | src/pubkey/rw/rw.h | 5 |
7 files changed, 10 insertions, 17 deletions
diff --git a/src/pubkey/dl_algo/dl_algo.h b/src/pubkey/dl_algo/dl_algo.h index efd25c995..bb594a393 100644 --- a/src/pubkey/dl_algo/dl_algo.h +++ b/src/pubkey/dl_algo/dl_algo.h @@ -70,8 +70,6 @@ class BOTAN_DLL DL_Scheme_PublicKey : public virtual Public_Key DL_Scheme_PublicKey() {} BigInt y; DL_Group group; - private: - virtual void X509_load_hook() {} }; /** @@ -98,8 +96,6 @@ class BOTAN_DLL DL_Scheme_PrivateKey : public virtual DL_Scheme_PublicKey, protected: DL_Scheme_PrivateKey() {} BigInt x; - private: - virtual void PKCS8_load_hook(RandomNumberGenerator&, bool = false) {} }; } diff --git a/src/pubkey/if_algo/if_algo.cpp b/src/pubkey/if_algo/if_algo.cpp index a68a38ce7..e0042fc1a 100644 --- a/src/pubkey/if_algo/if_algo.cpp +++ b/src/pubkey/if_algo/if_algo.cpp @@ -79,14 +79,6 @@ IF_Scheme_PrivateKey::IF_Scheme_PrivateKey(const AlgorithmIdentifier&, } /* -* Algorithm Specific X.509 Initialization Code -*/ -void IF_Scheme_PublicKey::X509_load_hook() - { - core = IF_Core(e, n); - } - -/* * Algorithm Specific PKCS #8 Initialization Code */ void IF_Scheme_PrivateKey::PKCS8_load_hook(RandomNumberGenerator& rng, diff --git a/src/pubkey/if_algo/if_algo.h b/src/pubkey/if_algo/if_algo.h index d2fb7809d..d5e3ce5b3 100644 --- a/src/pubkey/if_algo/if_algo.h +++ b/src/pubkey/if_algo/if_algo.h @@ -47,7 +47,6 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key protected: IF_Scheme_PublicKey() {} - virtual void X509_load_hook(); BigInt n, e; IF_Core core; }; diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp index 83e6e1b17..33999f1cd 100644 --- a/src/pubkey/rsa/rsa.cpp +++ b/src/pubkey/rsa/rsa.cpp @@ -20,7 +20,7 @@ RSA_PublicKey::RSA_PublicKey(const BigInt& mod, const BigInt& exp) { n = mod; e = exp; - X509_load_hook(); + core = IF_Core(e, n); } /* diff --git a/src/pubkey/rsa/rsa.h b/src/pubkey/rsa/rsa.h index 33a049efe..c1210d22a 100644 --- a/src/pubkey/rsa/rsa.h +++ b/src/pubkey/rsa/rsa.h @@ -29,7 +29,10 @@ class BOTAN_DLL RSA_PublicKey : public PK_Encrypting_Key, RSA_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion<byte>& key_bits) : - IF_Scheme_PublicKey(alg_id, key_bits) { X509_load_hook(); } + IF_Scheme_PublicKey(alg_id, key_bits) + { + core = IF_Core(e, n); + } /** * Create a RSA_PublicKey diff --git a/src/pubkey/rw/rw.cpp b/src/pubkey/rw/rw.cpp index def0ae689..f6d67bbde 100644 --- a/src/pubkey/rw/rw.cpp +++ b/src/pubkey/rw/rw.cpp @@ -21,7 +21,7 @@ RW_PublicKey::RW_PublicKey(const BigInt& mod, const BigInt& exp) { n = mod; e = exp; - X509_load_hook(); + core = IF_Core(e, n); } /* diff --git a/src/pubkey/rw/rw.h b/src/pubkey/rw/rw.h index dff9a17dc..bc8f053b6 100644 --- a/src/pubkey/rw/rw.h +++ b/src/pubkey/rw/rw.h @@ -25,7 +25,10 @@ class BOTAN_DLL RW_PublicKey : public PK_Verifying_with_MR_Key, RW_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion<byte>& key_bits) : - IF_Scheme_PublicKey(alg_id, key_bits) { X509_load_hook(); } + IF_Scheme_PublicKey(alg_id, key_bits) + { + core = IF_Core(e, n); + } RW_PublicKey(const BigInt& mod, const BigInt& exponent); protected: |