https://github.com/openssl/openssl/commit/3aef36ffef89849348049296892327e6fdf9d705

That commit caused EC_PRE_COMP to lose a lot of generality. Was a
function pointer approach like below considered? I'm not trying to
resurrect EC_EXTRA_DATA, but a *little* flexibility would be nice.

BBB

diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_lcl.h
index 2c5e1d9..9f5d4ec 100644
--- a/crypto/ec/ec_lcl.h
+++ b/crypto/ec/ec_lcl.h
@@ -256,24 +256,11 @@ struct ec_group_st {
     BN_MONT_CTX *mont_data;

     /* precomputed values for speed. */
-    enum {
-        pct_none,
-        pct_nistp224, pct_nistp256, pct_nistp521, pct_nistz256,
-        pct_ec } pre_comp_type;
-    union {
-        NISTP224_PRE_COMP *nistp224;
-        NISTP256_PRE_COMP *nistp256;
-        NISTP521_PRE_COMP *nistp521;
-        NISTZ256_PRE_COMP *nistz256;
-        EC_PRE_COMP *ec;
-    } pre_comp;
+    void (*pre_comp_free) (EC_PRE_COMP *);
+    EC_PRE_COMP *(*pre_comp_dup) (EC_PRE_COMP *);
+    EC_PRE_COMP *pre_comp;
 } /* EC_GROUP */ ;
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to