aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/nr
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-04 03:22:35 +0000
committerlloyd <[email protected]>2010-03-04 03:22:35 +0000
commit76f39cc9fe4b2a3354db22f8beaf0c3788578b79 (patch)
treec25ddaf29f22dc29786487d606d68c2344c46f22 /src/pubkey/nr
parentda09382f398dcf27a3ffdb82dd9f916ba96567ac (diff)
Add a new constructor to each public key algorithm (only the public
keys so far, private keys not changed) that takes an AlgorithmIdentifier and a MemoryRegion<byte>&. This performs the X.509 decoding. It is not possible anymore to create uninitialized PK objects.
Diffstat (limited to 'src/pubkey/nr')
-rw-r--r--src/pubkey/nr/nr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pubkey/nr/nr.h b/src/pubkey/nr/nr.h
index 144c5ec2a..64b50fc7f 100644
--- a/src/pubkey/nr/nr.h
+++ b/src/pubkey/nr/nr.h
@@ -29,9 +29,14 @@ class BOTAN_DLL NR_PublicKey : public PK_Verifying_with_MR_Key,
u32bit message_parts() const { return 2; }
u32bit message_part_size() const;
- NR_PublicKey() {}
+ NR_PublicKey(const AlgorithmIdentifier& alg_id,
+ const MemoryRegion<byte>& key_bits) :
+ DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_57)
+ { X509_load_hook(); }
+
NR_PublicKey(const DL_Group&, const BigInt&);
protected:
+ NR_PublicKey() {}
NR_Core core;
private:
void X509_load_hook();