aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-12-04 22:06:32 +0100
committerRenĂ© Korthaus <[email protected]>2016-12-05 10:28:38 +0100
commit8690e4e616367c12412fb56bc1826be203a4614b (patch)
treedace4204f21931d458ceeadf351428f01792f215 /src/lib/pubkey/xmss
parent61c4932f27c060a691ddc04fb75d227a1e8365dd (diff)
Add Public_Key::subject_public_key()
Adds new Public_Key::subject_public_key() that returns a X.509 SubjectPublicKey structure. Renames the current Public_Key::x509_subject_public_key() to public_key_bits(). BER_encode() just invokes subject_public_key().
Diffstat (limited to 'src/lib/pubkey/xmss')
-rw-r--r--src/lib/pubkey/xmss/xmss_publickey.h9
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h4
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_publickey.h4
3 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/pubkey/xmss/xmss_publickey.h b/src/lib/pubkey/xmss/xmss_publickey.h
index b8aa8d920..23c8032c2 100644
--- a/src/lib/pubkey/xmss/xmss_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_publickey.h
@@ -216,13 +216,12 @@ class BOTAN_DLL XMSS_PublicKey : public virtual Public_Key
}
/**
- * Currently x509 is not suppoerted for XMSS. x509_subject_public_key()
- * returns a raw byte sequence as defined in [1]. This method acts as
- * alias for raw_public_key().
+ * Returns a raw byte sequence as defined in [1].
+ * This method acts as an alias for raw_public_key().
*
- * @return raw non x509 compliant public key.
+ * @return raw public key bits.
**/
- virtual std::vector<byte> x509_subject_public_key() const override
+ virtual std::vector<byte> public_key_bits() const override
{
return raw_public_key();
}
diff --git a/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h b/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h
index a07b0b803..74e686f9f 100644
--- a/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_addressed_publickey.h
@@ -82,9 +82,9 @@ class XMSS_WOTS_Addressed_PublicKey : public virtual Public_Key
return m_pub_key.estimated_strength();
}
- virtual std::vector<byte> x509_subject_public_key() const override
+ virtual std::vector<byte> public_key_bits() const override
{
- return m_pub_key.x509_subject_public_key();
+ return m_pub_key.public_key_bits();
}
protected:
diff --git a/src/lib/pubkey/xmss/xmss_wots_publickey.h b/src/lib/pubkey/xmss/xmss_wots_publickey.h
index afb0ac847..4f414de27 100644
--- a/src/lib/pubkey/xmss/xmss_wots_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_publickey.h
@@ -261,9 +261,9 @@ class BOTAN_DLL XMSS_WOTS_PublicKey : virtual public Public_Key
return m_wots_params.estimated_strength();
}
- virtual std::vector<byte> x509_subject_public_key() const override
+ virtual std::vector<byte> public_key_bits() const override
{
- throw Not_Implemented("No x509 key format defined for XMSS-WOTS.");
+ throw Not_Implemented("No key format defined for XMSS-WOTS");
}
bool operator==(const XMSS_WOTS_PublicKey& key)