Skip to content

crypto.ecdsa: cleans out old deprecated keypair opaque from the module.#23887

Merged
spytheman merged 3 commits into
vlang:masterfrom
blackshirt:ecdsa_cleansup
Mar 9, 2025
Merged

crypto.ecdsa: cleans out old deprecated keypair opaque from the module.#23887
spytheman merged 3 commits into
vlang:masterfrom
blackshirt:ecdsa_cleansup

Conversation

@blackshirt

@blackshirt blackshirt commented Mar 9, 2025

Copy link
Copy Markdown
Contributor

After this PR has been merged, all info's of high level opaque was already availables on the public and private key object, so, we can start out the removal of the deprecated ec_key opaque.
This PR contains this cleansup step in one-shoot commit. This cleansup significantly reduces the overall size line of the code, ie,

  • ecdsa.v file, reduced from 905 lines down to 621 lines
  • ecdsa.c.v file reduced from 200 down to 172 lines
  • util.v gets increased from 233 into 247, not too much addition, mostly for checking functionality
  • the rest test files remain the same, not changed in the count

This PR contains some bits in the forms of :

  • Removes out of EC_KEY opaque from definitions and private and public key structure
  • Removes out of the alls of an old deprecated of EC_KEY based functionality and relies on the new high level EVP_PKEY opaque.
  • Removes out unneeded old helpers function
  • Removes out unneeded C declarations
  • Add needed C declarations to the file
  • Add some required helpers
  • Some bits of fixs on the the test and code.

The good news is, on my test box, its now buildable with -cstrict options, where previously, its would fail with these option because of deprecation error.

Good days..thx

@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22290

Comment thread vlib/crypto/ecdsa/util.v Outdated

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work!
Now the module tests, pass with -cstrict, for both gcc and clang, on my system.
Screenshot_2025-03-09_09-57-46

@spytheman spytheman merged commit 309aebf into vlang:master Mar 9, 2025
@blackshirt

Copy link
Copy Markdown
Contributor Author

Excellent work! Now the module tests, pass with -cstrict, for both gcc and clang, on my system. Screenshot_2025-03-09_09-57-46

Good to have finally we reach out the migration and clean it up. I would look into it maybe there are something can be improved (cleaned)

@blackshirt blackshirt deleted the ecdsa_cleansup branch March 10, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants