diff options
author | lloyd <[email protected]> | 2006-09-06 19:48:09 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-06 19:48:09 +0000 |
commit | e00227828d80f9c9a17ef236586211faa01e4193 (patch) | |
tree | 2573533839150184038b18d7789eaef1ee5dd904 /src/dsa.cpp | |
parent | 7f176fd2259fcb395ca03751f19790eac15bd9ce (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/dsa.cpp')
-rw-r--r-- | src/dsa.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/dsa.cpp b/src/dsa.cpp index d3fc9107a..f5f7d1765 100644 --- a/src/dsa.cpp +++ b/src/dsa.cpp @@ -25,7 +25,7 @@ DSA_PublicKey::DSA_PublicKey(const DL_Group& grp, const BigInt& y1) void DSA_PublicKey::X509_load_hook() { core = DSA_Core(group, y); - check_loaded_public(); + load_check(); } /************************************************* @@ -61,8 +61,7 @@ DSA_PrivateKey::DSA_PrivateKey(const DL_Group& grp) group = grp; x = random_integer(2, group_q() - 1); - PKCS8_load_hook(); - check_generated_private(); + PKCS8_load_hook(true); } /************************************************* @@ -76,17 +75,21 @@ DSA_PrivateKey::DSA_PrivateKey(const DL_Group& grp, const BigInt& x1, x = x1; PKCS8_load_hook(); - check_loaded_private(); } /************************************************* * Algorithm Specific PKCS #8 Initialization Code * *************************************************/ -void DSA_PrivateKey::PKCS8_load_hook() +void DSA_PrivateKey::PKCS8_load_hook(bool generated) { if(y == 0) y = power_mod(group_g(), x, group_p()); core = DSA_Core(group, y, x); + + if(generated) + gen_check(); + else + load_check(); } /************************************************* |