]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
private-key: Add optional method that returns supported signature schemes
authorTobias Brunner <tobias@strongswan.org>
Fri, 12 Oct 2018 08:35:04 +0000 (10:35 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 25 Oct 2018 15:21:32 +0000 (17:21 +0200)
src/libstrongswan/credentials/keys/private_key.h

index d7cfdd74df5bbd125130786e0915d6e5f602bf55..5cf8641ad83af503b0ac6759bc547a5d351c0a69 100644 (file)
@@ -39,6 +39,19 @@ struct private_key_t {
         */
        key_type_t (*get_type)(private_key_t *this);
 
+       /**
+        * Get signature schemes supported by this key.
+        *
+        * This is useful for keys that only support certain hash algorithms or
+        * require specific parameters for RSA/PSS signatures.
+        *
+        * @note Implementing this method is optional. If multiple schemes are
+        * returned, they should be ordered by decreasing preference.
+        *
+        * @return                      enumerator over signature_params_t*
+        */
+       enumerator_t *(*supported_signature_schemes)(private_key_t *this);
+
        /**
         * Create a signature over a chunk of data.
         *