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

Extended Master Secret Generation PK Callback #8303

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

night1rider
Copy link
Contributor

@night1rider night1rider commented Dec 19, 2024

Feature Request for the ability to do a callback function for EMS Generation

ZD#19038

@night1rider night1rider self-assigned this Dec 19, 2024
@night1rider night1rider changed the title Extended Master Secret PK Callback Extended Master Secret Generation PK Callback Dec 19, 2024
@night1rider
Copy link
Contributor Author

Tested call back by adding a new callback for PK in the client/server example. Added and registered myGenExtMaster and tested with

./configure --enable-pkcallbacks --enable-extended-master CFLAGS="-DTEST_PK_PRIVKEY"

myGenExtMaster simple falls through but will print a debug message Gen Extended Master

Detailed Logs

Client ran with ./examples/client/client -P

PK RSA Verify: sigSz 256, keySz 270
PK RSA Verify: ret 51
PK RSA Verify: sigSz 256, keySz 270
PK RSA Verify: ret 51
PK RSA PSS Verify: sigSz 256, hash 414, mgf 1, keySz 270
PK RSA PSS Verify: ret 64
PK ECC PMS: Side client, Peer Curve 7
PK ECC KeyGen: keySz 0, Curve ID 7
PK ECC KeyGen: ret 0
PK ECC PMS: ret 0, PubKeySz 65, OutLen 32
Gen Extended MasterGen Extended Master: ret -288
Gen Master CbGen Master Cb: ret -288
PK RSA PSS Sign: inSz 32, hash 414, mgf 1, keySz 0
PK RSA PSS Sign: ret 0, outSz 256
PK RSA PSS SignCheck: sigSz 256, hash 414, mgf 1, keySz 0
PK RSA PSS SignCheck: ret 64
Set Encrypt Keys CbSet Encrypt Keys Cb: ret -288
Tls Finished CbTls Finished Cb: ret -288
Set Encrypt Keys CbSet Encrypt Keys Cb: ret -288
Tls Finished CbTls Finished Cb: ret -288
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
SSL curve name is SECP256R1
I hear you fa shizzle!

Server ran with ./examples/server/server -P

PK ECC KeyGen: keySz 32, Curve ID 7
PK ECC KeyGen: ret 0
PK RSA PSS Sign: inSz 32, hash 414, mgf 1, keySz 0
PK RSA PSS Sign: ret 0, outSz 256
PK RSA PSS SignCheck: sigSz 256, hash 414, mgf 1, keySz 0
PK RSA PSS SignCheck: ret 64
PK RSA Verify: sigSz 256, keySz 270
PK RSA Verify: ret 51
PK ECC PMS: Side server, Peer Curve 7
PK ECC PMS: ret 0, PubKeySz 65, OutLen 32
Gen Extended Master: ret -288
Gen Master Cb: ret -288
PK RSA PSS Verify: sigSz 256, hash 414, mgf 1, keySz 270
PK RSA PSS Verify: ret 64
Set Encrypt Keys Cb: ret -288
Tls Finished Cb: ret -288
Set Encrypt Keys Cb: ret -288
Tls Finished Cb: ret -288
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
SSL curve name is SECP256R1
Client message: hello wolfssl!

@night1rider night1rider marked this pull request as ready for review December 19, 2024 23:44
@dgarske dgarske assigned wolfSSL-Bot and unassigned night1rider Dec 30, 2024
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