aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/dh/dh.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/dh/dh.h')
-rw-r--r--src/pubkey/dh/dh.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pubkey/dh/dh.h b/src/pubkey/dh/dh.h
index fa558bce2..7b81008a3 100644
--- a/src/pubkey/dh/dh.h
+++ b/src/pubkey/dh/dh.h
@@ -26,11 +26,10 @@ class BOTAN_DLL DH_PublicKey : public virtual DL_Scheme_PublicKey
DL_Group::Format group_format() const { return DL_Group::ANSI_X9_42; }
- /**
- * Construct an uninitialized key. Use this constructor if you wish
- * to decode an encoded key into the new instance.
- */
- DH_PublicKey() {}
+ DH_PublicKey(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits) :
+ DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_42)
+ { X509_load_hook(); }
/**
* Construct a public key with the specified parameters.
@@ -38,6 +37,8 @@ class BOTAN_DLL DH_PublicKey : public virtual DL_Scheme_PublicKey
* @param y the public value y
*/
DH_PublicKey(const DL_Group& grp, const BigInt& y);
+ protected:
+ DH_PublicKey() {}
private:
void X509_load_hook();
};