-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix demos to work with new wolfHSM API #17
Merged
Merged
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6d9cd1f
WIP
billphipps a536940
added missing re-set of AES IV
bigbrett b56dd6c
v1.0 rsa fixes
bigbrett 598576b
remove erroneously committed file
bigbrett 4d80df8
some curve25519 fixes - import demo still fails
bigbrett dab2887
updated curve25519 demo to use new DER cert parsing
bigbrett 12b67e0
replace deprecated usleep with POSIX compliant nanosleep
bigbrett 1dc3bf7
fix AES cbc and some return values
bigbrett 8083713
fixed improper error code propagation
bigbrett 1f8bce9
revert function name for simplicity
bigbrett c28eb2f
rebase + fix merge conflicts
bigbrett 5dd9c52
formatting fixes
bigbrett 915784a
fix bad user settings
bigbrett 31e375e
add -Werror
bigbrett ccf65a8
add all algos back in, fix ECC to use DER keys
bigbrett 0c13583
clang-format
bigbrett f362f3d
fixed RSA
bigbrett 312b72d
add keys
bigbrett 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 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
Build/ | ||
demo/certs/*.pem | ||
|
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# ECC Keys | ||
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:prime256v1 -out alice-ecc256-key.pem | ||
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:prime256v1 -out bob-ecc256-key.pem | ||
openssl ec -in alice-ecc256-key.pem -outform DER -out alice-ecc256-key.der | ||
openssl ec -in bob-ecc256-key.pem -outform DER -out bob-ecc256-key.der | ||
|
||
# RSA Key | ||
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out rsa-2048-key.pem | ||
openssl rsa -in rsa-2048-key.pem -outform DER -out rsa-2048-key.der | ||
|
||
# TODO: Curve25519 Keys | ||
# Either need to modify examples to split out public/private operations, or modify wolfHSM to be able to recove public keys on deserialization of private only. | ||
#openssl genpkey -algorithm X25519 -out alice-curve25519-key.pem | ||
#openssl genpkey -algorithm X25519 -out bob-curve25519-key.pem | ||
#openssl pkey -in alice-curve25519-key.pem -outform DER -out alice-curve25519-key.der | ||
#openssl pkey -in bob-curve25519-key.pem -outform DER -out bob-curve25519-key.der |
Binary file not shown.
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.
Grumble. Hate relying on openssl. Maybe we should leave some pregenerated keys in PEM format in the repo as well in case they don't have openssl available? No change recommended at this point. Just a thought.