-
Notifications
You must be signed in to change notification settings - Fork 13
Implement RAT extensions #121
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| cd ./test/recipes/80-test_cmp_http_data/Mock | ||
| # gdb --args \ | ||
| ../../../../cmpClient \ | ||
| -config ../test.cnf \ | ||
| -section "Mock" -cmd cr \ | ||
| -rats \ | ||
| -tpmkd_tokenname "tcg-key-req" \ | ||
| -tpmkd_tokencfgpath "../../../../atg/atglib-key-attestation-demo/token-cfg.json" \ | ||
| -tpmkd_plugincfgpath "../../../../atg/atglib-key-attestation-demo/plugins.json" \ | ||
| -tpmkd_nonce test_nonce_1234 \ | ||
| -atcha_tokenname "tcg-key-chal" \ | ||
| -atcha_tokencfgpath "../../../../atg/atglib-key-attestation-demo/token-cfg.json" \ | ||
| -atcha_plugincfgpath "../../../../atg/atglib-key-attestation-demo/plugins.json" \ | ||
| -atcha_nonce test_nonce_5678 | ||
|
|
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export OPENSSL_DIR=~/git/openssl | ||
| export OPENSSL_LIB=~/git/openssl | ||
| export LD_LIBRARY_PATH=~/git/openssl/:~/git/gencmpclient | ||
| export PATH=~/git/openssl/apps:$PATH | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -35,7 +35,6 @@ extern "C" { | |
| /* for low-level CMP API, in particular, type OSSL_CMP_CTX */ | ||
| # include <openssl/cmp.h> | ||
| /* for abbreviation and backward compatibility: */ | ||
| typedef OSSL_CMP_CTX CMP_CTX; | ||
|
|
||
| # if OPENSSL_VERSION_NUMBER < 0x30000080L | ||
| # define OSSL_CMP_PKISTATUS_request -3 | ||
|
|
@@ -126,6 +125,16 @@ typedef int CMP_err; | |
| # include "genericCMPClient_util.h" | ||
| # endif /* ndef GENCMP_NO_SECUTILS */ | ||
|
|
||
| #include "atglib-key-attestation-demo/libatg.h" | ||
|
|
||
| typedef struct CMP_CTX { | ||
| OSSL_CMP_CTX *osslctx; | ||
| bool do_rats; | ||
| struct token_req tpm_kd_req; | ||
| struct token_req attest_chal; | ||
| } CMP_CTX; | ||
|
|
||
|
|
||
|
Comment on lines
+129
to
+137
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please avoid extending |
||
| /* CMP client core functions */ | ||
| /* should be called once, as soon as the application starts */ | ||
| CMP_err CMPclient_init(OPTIONAL const char *name, OPTIONAL LOG_cb_t log_fn); | ||
|
|
@@ -216,10 +225,10 @@ CMP_err CMPclient_pkcs10(CMP_CTX *ctx, CREDENTIALS **new_creds, | |
| const X509_REQ *csr); | ||
| CMP_err CMPclient_update(CMP_CTX *ctx, CREDENTIALS **new_creds, | ||
| OPTIONAL const EVP_PKEY *new_key); | ||
| CMP_err CMPclient_update_anycert(OSSL_CMP_CTX *ctx, CREDENTIALS **new_creds, | ||
| CMP_err CMPclient_update_anycert(CMP_CTX *ctx, CREDENTIALS **new_creds, | ||
| OPTIONAL const X509 *old_cert, | ||
| OPTIONAL const EVP_PKEY *new_key); | ||
| CMP_err CMPclient_update_with_exts(OSSL_CMP_CTX *ctx, CREDENTIALS **new_creds, | ||
| CMP_err CMPclient_update_with_exts(CMP_CTX *ctx, CREDENTIALS **new_creds, | ||
| OPTIONAL const X509 *old_cert, | ||
| OPTIONAL const EVP_PKEY *new_key, | ||
| OPTIONAL const X509_EXTENSIONS *exts); | ||
|
|
@@ -252,7 +261,7 @@ CMP_err CMPclient_crlUpdate(CMP_CTX *ctx, OPTIONAL const X509 *cert, | |
| # endif | ||
|
|
||
| /* get error information sent by the server */ | ||
| char *CMPclient_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, | ||
| char *CMPclient_snprint_PKIStatus(const CMP_CTX *ctx, | ||
| char *buf, size_t bufsize); | ||
|
|
||
| /* must be called between any of the above certificate management activities */ | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| cd ~/git/gencmpclient/test/recipes/80-test_cmp_http_data/Mock | ||
| openssl cmp -config server.cnf | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why would we need this?
The LD_LIBRARY_PATH should generally not be needed due to
rpath.Everything else is user-specific, not for general use in this project.
Better not commit this file.