aboutsummaryrefslogtreecommitdiffstats
path: root/src/pkcs8.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-12 03:08:18 +0000
committerlloyd <[email protected]>2008-04-12 03:08:18 +0000
commit66d92bc063a4cbb69e4242a15c3a90daa3db069e (patch)
treef48af6779692e324cbee3ee64cdf45c98a619f5f /src/pkcs8.cpp
parent21669116db5ccb075d92a24af763f7b8c7a32976 (diff)
Remove Config::option_as_u32bit - the only advantage it had over calling
to_u32but on the return value from Config::option was that it passed it through parse_expr, which did some simple evaluation tricks so you could say 64*1024. That does not seem worth the cost in code, especially because most of the values so controlled are probably never changed. By making them compile time constants, additional optimizations are possible in the source as well as by the compiler. Remove the pkcs8_tries config option. Hardcode that value to 3 instead. I want to rewrite that code in the relatively near future and all that will (hopefully) go away.
Diffstat (limited to 'src/pkcs8.cpp')
-rw-r--r--src/pkcs8.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkcs8.cpp b/src/pkcs8.cpp
index c99be316c..b3366acd2 100644
--- a/src/pkcs8.cpp
+++ b/src/pkcs8.cpp
@@ -77,8 +77,7 @@ SecureVector<byte> PKCS8_decode(DataSource& source, const User_Interface& ui,
if(!is_encrypted)
key = key_data;
- const u32bit MAX_TRIES =
- global_config().option_as_u32bit("base/pkcs8_tries");
+ const u32bit MAX_TRIES = 3;
u32bit tries = 0;
while(true)