-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
87 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
alias Mix.Tasks.Help | ||
alias KlifeProtocol.TestSupport.Helpers | ||
alias KlifeProtocol.Messages | ||
alias KlifeProtocol.Socket | ||
|
||
Helpers.initialize_shared_storage() | ||
|
||
ssl_opts = [ | ||
verify: :verify_peer, | ||
cacertfile: Path.relative("test/compose_files/truststore/ca.crt") | ||
cacertfile: Path.relative("test/compose_files/ssl/ca.crt") | ||
] |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
mkdir ./ssl/tmp | ||
|
||
openssl req -new -x509 -keyout ./ssl/ca.key -out ./ssl/ca.crt -days 3650 -subj '/CN=localhost/OU=klife_protocol/O=klife/L=brazil/C=br' -passin pass:klifeprotocol -passout pass:klifeprotocol | ||
|
||
keytool -genkey -noprompt \ | ||
-alias localhost \ | ||
-dname "CN=localhost, OU=klife_protocol, O=klife, L=brazil, C=br" \ | ||
-keystore ./ssl/localhost.keystore.jks \ | ||
-keyalg RSA \ | ||
-storepass klifeprotocol \ | ||
-keypass klifeprotocol \ | ||
-validity 3650 | ||
|
||
keytool -keystore ./ssl/localhost.keystore.jks -alias localhost -certreq -file ./ssl/tmp/localhost.csr -storepass klifeprotocol -keypass klifeprotocol | ||
|
||
openssl x509 -req -CA ./ssl/ca.crt -CAkey ./ssl/ca.key -in ./ssl/tmp/localhost.csr -out ./ssl/tmp/localhost-ca-signed.crt -days 3650 -CAcreateserial -passin pass:klifeprotocol | ||
|
||
keytool -keystore ./ssl/localhost.keystore.jks -alias CARoot -import -noprompt -file ./ssl/ca.crt -storepass klifeprotocol -keypass klifeprotocol | ||
|
||
keytool -keystore ./ssl/localhost.keystore.jks -alias localhost -import -file ./ssl/tmp/localhost-ca-signed.crt -storepass klifeprotocol -keypass klifeprotocol | ||
|
||
keytool -keystore ./ssl/localhost.truststore.jks -alias CARoot -import -noprompt -file ./ssl/ca.crt -storepass klifeprotocol -keypass klifeprotocol | ||
|
||
rm -rf ./ssl/tmp |
Binary file not shown.
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,22 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDlzCCAn+gAwIBAgIUcOPRU2TYwIStODKyx4076xke8rAwDQYJKoZIhvcNAQEL | ||
BQAwWzESMBAGA1UEAwwJbG9jYWxob3N0MRcwFQYDVQQLDA5rbGlmZV9wcm90b2Nv | ||
bDEOMAwGA1UECgwFa2xpZmUxDzANBgNVBAcMBmJyYXppbDELMAkGA1UEBhMCYnIw | ||
HhcNMjQwMzI4MjI1MTMxWhcNMzQwMzI2MjI1MTMxWjBbMRIwEAYDVQQDDAlsb2Nh | ||
bGhvc3QxFzAVBgNVBAsMDmtsaWZlX3Byb3RvY29sMQ4wDAYDVQQKDAVrbGlmZTEP | ||
MA0GA1UEBwwGYnJhemlsMQswCQYDVQQGEwJicjCCASIwDQYJKoZIhvcNAQEBBQAD | ||
ggEPADCCAQoCggEBAJEWx2hJNZI46lDlja7QBoOKnytck0wr8/phfLODtoQZt31C | ||
ImmzqyJi6Q4hotiYhNY53aVpsCz/4QEuo2d4HDCU/LRdEhr6U5Bc6TcdIqzoso2+ | ||
btTboVA9oXZHfVdL5ZK3weWIo+4Sp8IN1xeswAxbB3SEo611NDKUCN7TyGN+6LJR | ||
1UgPQSXfmxyzDEA1VwDMn4fjQ+LMgAxTg8/Y/W8T044Zk7G5vbRkIx6KBpjI9EW5 | ||
Mn2xQafKZSlJnTqjMnLabtMvSjCe6i0UDfTrj1pX9Tcq+DRKFrsf81SGMkl5mXD0 | ||
5qnLBj63X22yl18N9POCAnypIlJCKlIBs7BHPT8CAwEAAaNTMFEwHQYDVR0OBBYE | ||
FFW1CLwjlxKu0ZqnNte4hgPr8kwOMB8GA1UdIwQYMBaAFFW1CLwjlxKu0ZqnNte4 | ||
hgPr8kwOMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI6UxlDN | ||
w48DPnzrG2RS/xIBI+6GuEvMa/nrVRIeuZFubCtdhZZ6wlGVvT7O/Ds/f2BVrRsx | ||
O9LughQdzjvmIUwQ75QA40xyxXPG24eNi5hxjwUR6Fbuk2mFnwNrC2AskBH6tmQw | ||
Up8hBcT/4w9uv6NUYZwnM+IaaG7jOr+iiIT9DyIS3VqBsxWKeZ8RzTqqjV17ecfC | ||
Zc7z+7y1AvxvSJ7Ag8U6krk/JtcI1dvLVVqAqjyD6l8KqpIL/RTVK1iB6DfKVnpJ | ||
pG9ZBQ8i59dxYrdpkTYXb2YkfPjdQfNwEL9fBJYYEzRgBkLyDThe/xXxZS/3bK5u | ||
EinHlwerYDhG3/w= | ||
-----END CERTIFICATE----- |
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,30 @@ | ||
-----BEGIN ENCRYPTED PRIVATE KEY----- | ||
MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQI1DClX5NjHyACAggA | ||
MAwGCCqGSIb3DQIJBQAw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7Vt | ||
Wv2uOwAuYUzLNLxb4gpnfV0WoXSWdSngfnkPMHAbckMqVDhb+FlrJuDUCHRIxdg/ | ||
vOhJsraTCPqr/lLXtfWEouVjCvDlCEyg/0FdgN91+Hw2S/eQtVaijNucellC5cmS | ||
7c7uhJm5A7tR+R4+WgrtnoRc1Q40vliuBvYTdXveO01xwxiiRh23DreQJzbq9vCO | ||
T6SbBg8/vrbUExKRIcjmSBN+P8CI3kW+JebMd6SHrm1bfQw+lk2iD8wXXNbKD8hh | ||
K3uDEEtOyzPNxCJiMLji2GEpV17vQ01AAlcM1+ZFIUxwB5LC1R1rxfLKD2uc/rDV | ||
b1+0nFpIvXgPNxhWqfa6Vr7KYS+3BJn4K0iJa/OSxRWVipm64pAXwKC7XOY0hcnv | ||
a05OQsrbV6N9iPcniP695ZJKeX9+7rYl48WYmuJJ+HxvjmU88EWfv0PEnr4eLzqZ | ||
7sAsn7aGYHsNBmdggMtbRTp9LZvtQyjHd0Sd+zw37AlsQ2/d/AZoMtYrLhdROxuO | ||
L5Uqq3DyrMLGDvmuQ7UmU8dvSVXYXXOUTi9BmQp88bYlwRegZEArQf1/dAJ2p1rI | ||
nH4jlwt7r2ZgtlLVNPLpwwD7SsTMLwS/okpgdex/GU3Tcg785lsJNAjSArD4dzl3 | ||
RqdjV2DeS8El8hJWTN4WnA== | ||
-----END ENCRYPTED PRIVATE KEY----- |
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 @@ | ||
2CDECFE8886A4E080F4AEF64452D7410E7F8926A |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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