-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add tests for TLSLib, to cover: TLS connection and service creation, Cipher lists settings #1257
base: dev/202405
Are you sure you want to change the base?
Conversation
- Add and integrate to project a TLS tests file - Initiate basic tests
@inbal2l please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
1 similar comment
@inbal2l please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
- Test for connection - Test for ciphers set/get
#define CIPHER_COUNT (sizeof(mCipherId) / sizeof(mCipherId[0])) | ||
|
||
|
||
// TODO: Check if we need to test other versions then SSL3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this https://github.com/microsoft/mu_basecore/blob/dev/202405/MdePkg/Include/IndustryStandard/Tls1.h#L62
it seems that these values correspond to TLS1.0
|
||
UNIT_TEST_STATUS | ||
EFIAPI | ||
TestTls31ServiceCreateConnection ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLS version is 1.0 in this case also, need to fix function name from Tls31 to something else
// | ||
{ "TestTls31CreatCtxObjNewFree()", "CryptoPkg.BaseCryptLib.Tls", TestTls31CreatCtxObjNewFree, TestVerifyTlsPreReq, NULL, NULL}, | ||
{ "TestTls31ServiceCreateConnection()", "CryptoPkg.BaseCryptLib.Tls", TestTls31ServiceCreateConnection, TestVerifyTlsPreReq, NULL, NULL}, | ||
{ "TestTls31VerifyConnection()", "CryptoPkg.BaseCryptLib.Tls", TestTls31VerifySetCipherList, TestVerifyTlsPreReq, NULL, NULL}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description does not match the function
|
||
UINT8 Buffer[256]; | ||
UINTN BufferSize = sizeof(Buffer); | ||
Status = TlsRead(TlsObj, Buffer, &BufferSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this https://github.com/microsoft/mu_crypto_release/blob/25ae58c0e612413f5b43c9deaf714df7ec4e136e/OpensslPkg/Library/TlsLib/TlsProcess.c#L412
the return value is not status, but the number of bytes read
- Minimize header dependancy - Fix funcs input type
Description
Add tests for TLSLib, covers:
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
Compilation checked locally on dev machine. Tests runtime by running Tiano_platforms simulator.
Integration Instructions
N/A