aboutsummaryrefslogtreecommitdiffstats
path: root/src/if_algo.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-06 19:48:09 +0000
committerlloyd <[email protected]>2006-09-06 19:48:09 +0000
commite00227828d80f9c9a17ef236586211faa01e4193 (patch)
tree2573533839150184038b18d7789eaef1ee5dd904 /src/if_algo.cpp
parent7f176fd2259fcb395ca03751f19790eac15bd9ce (diff)
Split PK_Key into Public_Key and Private_Key; these new classes merge in
the interfaces previously included in X509_PublicKey and PKCS8_PrivateKey.
Diffstat (limited to 'src/if_algo.cpp')
-rw-r--r--src/if_algo.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/if_algo.cpp b/src/if_algo.cpp
index 97d0d0510..afa428fde 100644
--- a/src/if_algo.cpp
+++ b/src/if_algo.cpp
@@ -159,13 +159,13 @@ PKCS8_Decoder* IF_Scheme_PrivateKey::pkcs8_decoder()
void IF_Scheme_PublicKey::X509_load_hook()
{
core = IF_Core(e, n);
- check_loaded_public();
+ load_check();
}
/*************************************************
* Algorithm Specific PKCS #8 Initialization Code *
*************************************************/
-void IF_Scheme_PrivateKey::PKCS8_load_hook()
+void IF_Scheme_PrivateKey::PKCS8_load_hook(bool generated)
{
if(n == 0) n = p * q;
if(d1 == 0) d1 = d % (p - 1);
@@ -173,6 +173,11 @@ void IF_Scheme_PrivateKey::PKCS8_load_hook()
if(c == 0) c = inverse_mod(q, p);
core = IF_Core(e, n, d, p, q, d1, d2, c);
+
+ if(generated)
+ gen_check();
+ else
+ load_check();
}
/*************************************************