Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minicrypto sign #559

Closed
wants to merge 2 commits into from
Closed

minicrypto sign #559

wants to merge 2 commits into from

Conversation

doublex
Copy link

@doublex doublex commented Jan 21, 2025

The signing code is messy.
The setup function is not ptls_minicrypto_init_secp256r1sha256_sign_certificate() but the privatekey parser ptls_set_ecdsa_private_key().
Wrapped in ptls_minicrypto_load_private_key().
ptls_minicrypto_secp256r1sha256_sign_certificate_t is exported in minicrypto.h.

The call stack should be: ptls_minicrypto_sign_cert() -> load + parse private-key -> setup according to key OID.

Changes:
Rename: uecc.c to sign.c
Move: ptls_set_ecdsa_private_key() to sign.c
Inline: ptls_minicrypto_init_secp256r1sha256_sign_certificate() into ptls_set_ecdsa_private_key()
Move: ptls_minicrypto_secp256r1sha256_sign_certificate_t from minicrypto.h to sign.c
Add new API: ptls_minicrypto_init_sign_certificate() and ptls_minicrypto_dispose_sign_certificate()

This pull request breaks the current signing API.

@doublex doublex closed this Jan 31, 2025
@doublex doublex deleted the serversign branch January 31, 2025 20:14
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.

1 participant