aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-20 07:12:13 -0400
committerJack Lloyd <[email protected]>2019-08-20 07:12:13 -0400
commit49c6abc4a9a190c3d1af688260f2ca618599e334 (patch)
tree5ddce500e95ee9f0d3f35816775ae5cef5f5048e /src/lib/pubkey
parentf46f11d67a118d4153c9e1ac7d1e357b0c3578bc (diff)
parentb00a58dac14e080187c2357abcf965e3ea1979bd (diff)
Merge GH #2051 Have cli sign util update stateful keys
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/pk_keys.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_privatekey.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/pubkey/pk_keys.h b/src/lib/pubkey/pk_keys.h
index e7e86d8fa..6f2b7ab60 100644
--- a/src/lib/pubkey/pk_keys.h
+++ b/src/lib/pubkey/pk_keys.h
@@ -186,6 +186,8 @@ class BOTAN_PUBLIC_API(2,0) Private_Key : public virtual Public_Key
Private_Key& operator=(const Private_Key& other) = default;
virtual ~Private_Key() = default;
+ virtual bool stateful_operation() const { return false; }
+
/**
* @return BER encoded private key bits
*/
diff --git a/src/lib/pubkey/xmss/xmss_privatekey.h b/src/lib/pubkey/xmss/xmss_privatekey.h
index d362f99b5..2bfcbc82e 100644
--- a/src/lib/pubkey/xmss/xmss_privatekey.h
+++ b/src/lib/pubkey/xmss/xmss_privatekey.h
@@ -91,6 +91,8 @@ class BOTAN_PUBLIC_API(2,0) XMSS_PrivateKey final : public virtual XMSS_PublicKe
set_unused_leaf_index(idx_leaf);
}
+ bool stateful_operation() const override { return true; }
+
/**
* Retrieves the last unused leaf index of the private key. Reusing a leaf
* by utilizing leaf indices lower than the last unused leaf index will