aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/pk_keys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/pk_keys.cpp')
-rw-r--r--src/pubkey/pk_keys.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/pubkey/pk_keys.cpp b/src/pubkey/pk_keys.cpp
deleted file mode 100644
index c19c676ab..000000000
--- a/src/pubkey/pk_keys.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-* PK Key Types
-* (C) 1999-2007 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#include <botan/pk_keys.h>
-#include <botan/der_enc.h>
-#include <botan/oids.h>
-
-namespace Botan {
-
-/*
-* Default OID access
-*/
-OID Public_Key::get_oid() const
- {
- try {
- return OIDS::lookup(algo_name());
- }
- catch(Lookup_Error)
- {
- throw Lookup_Error("PK algo " + algo_name() + " has no defined OIDs");
- }
- }
-
-/*
-* Run checks on a loaded public key
-*/
-void Public_Key::load_check(RandomNumberGenerator& rng) const
- {
- if(!check_key(rng, BOTAN_PUBLIC_KEY_STRONG_CHECKS_ON_LOAD))
- throw Invalid_Argument(algo_name() + ": Invalid public key");
- }
-
-/*
-* Run checks on a loaded private key
-*/
-void Private_Key::load_check(RandomNumberGenerator& rng) const
- {
- if(!check_key(rng, BOTAN_PRIVATE_KEY_STRONG_CHECKS_ON_LOAD))
- throw Invalid_Argument(algo_name() + ": Invalid private key");
- }
-
-/*
-* Run checks on a generated private key
-*/
-void Private_Key::gen_check(RandomNumberGenerator& rng) const
- {
- if(!check_key(rng, BOTAN_PRIVATE_KEY_STRONG_CHECKS_ON_GENERATE))
- throw Self_Test_Failure(algo_name() + " private key generation failed");
- }
-
-}