-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #312 from dgarske/tls_pkcb
Added support for TLS PK callbacks with ECC and RSA Sign using PKCSv1.5 and PSS padding
- Loading branch information
Showing
13 changed files
with
840 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,8 @@ | |
|
||
#include <stdio.h> | ||
|
||
#if !defined(WOLFTPM2_NO_WRAPPER) && defined(WOLFTPM2_CERT_GEN) | ||
#if !defined(WOLFTPM2_NO_WRAPPER) && defined(WOLFTPM2_CERT_GEN) && \ | ||
defined(WOLFTPM_CRYPTOCB) | ||
|
||
#include <hal/tpm_io.h> | ||
#include <examples/tpm_test.h> | ||
|
@@ -72,11 +73,11 @@ static int TPM2_CSR_Generate(WOLFTPM2_DEV* dev, int keyType, WOLFTPM2_KEY* key, | |
/* make sure each subject is unique */ | ||
if (keyType == RSA_TYPE) { | ||
subject = "/C=US/ST=Oregon/L=Portland/SN=Test/O=wolfSSL" | ||
"/OU=RSA/CN=www.wolfssl.com/[email protected]"; | ||
"/OU=RSA/CN=127.0.0.1/[email protected]"; | ||
} | ||
else if (keyType == ECC_TYPE) { | ||
subject = "/C=US/ST=Oregon/L=Portland/SN=Test/O=wolfSSL" | ||
"/OU=ECC/CN=www.wolfssl.com/[email protected]"; | ||
"/OU=ECC/CN=127.0.0.1/[email protected]"; | ||
} | ||
|
||
outputSz = (int)sizeof(output); | ||
|
@@ -252,14 +253,15 @@ int TPM2_CSR_ExampleArgs(void* userCtx, int argc, char *argv[]) | |
/* --- END TPM2 CSR Example -- */ | ||
/******************************************************************************/ | ||
|
||
#endif /* !WOLFTPM2_NO_WRAPPER && WOLFTPM2_CERT_GEN */ | ||
#endif /* !WOLFTPM2_NO_WRAPPER && WOLFTPM2_CERT_GEN && WOLFTPM_CRYPTOCB */ | ||
|
||
#ifndef NO_MAIN_DRIVER | ||
int main(int argc, char *argv[]) | ||
{ | ||
int rc = -1; | ||
|
||
#if !defined(WOLFTPM2_NO_WRAPPER) && defined(WOLFTPM2_CERT_GEN) | ||
#if !defined(WOLFTPM2_NO_WRAPPER) && defined(WOLFTPM2_CERT_GEN) && \ | ||
defined(WOLFTPM_CRYPTOCB) | ||
rc = TPM2_CSR_ExampleArgs(NULL, argc, argv); | ||
#else | ||
(void)argc; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.