aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-29 14:39:16 +0000
committerlloyd <[email protected]>2008-04-29 14:39:16 +0000
commitaacaef7d54e997834baf64308b39a102eeb3dd1f (patch)
tree776d423b6b49283c5f9c682c10c548fd6898943c /src/config.cpp
parentaf8b04c4583dfcad766eeed656650821a9de8675 (diff)
Move Signature_Format enum to pubkey.h
Including enums.h in needed places since asn1_int.h doesn't pull it in anymore. Remove Config::choose_sig_format, and move its logic into its only caller, the (global!) choose_sig_format in x509_ca.cpp
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/config.cpp b/src/config.cpp
index bcca49bdf..d131b2f59 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -155,33 +155,4 @@ u32bit Config::option_as_time(const std::string& key) const
return scale * to_u32bit(value);
}
-/*************************************************
-* Choose the signature format for a PK algorithm *
-*************************************************/
-void Config::choose_sig_format(const std::string& algo_name,
- std::string& padding,
- Signature_Format& format)
- {
- if(algo_name == "RSA")
- {
- std::string hash = global_state().config().option("x509/ca/rsa_hash");
-
- if(hash == "")
- throw Invalid_State("No value set for x509/ca/rsa_hash");
-
- hash = global_state().config().deref_alias(hash);
-
- padding = "EMSA3(" + hash + ")";
- format = IEEE_1363;
- }
- else if(algo_name == "DSA")
- {
- std::string hash = global_state().config().deref_alias("SHA-1");
- padding = "EMSA1(" + hash + ")";
- format = DER_SEQUENCE;
- }
- else
- throw Invalid_Argument("Unknown X.509 signing key type: " + algo_name);
- }
-
}