-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ahmed Moussa <ahmed.moussa@iohk.io> Signed-off-by: Allain Magyar <allain.magyar@iohk.io>
- Loading branch information
1 parent
95d25a5
commit 247d174
Showing
14 changed files
with
122 additions
and
18 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
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
6 changes: 0 additions & 6 deletions
6
tests/end-to-end/src/test/kotlin/io/iohk/atala/prism/utils/Keys.kt
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
tests/end-to-end/src/test/kotlin/io/iohk/atala/prism/utils/Utils.kt
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,21 @@ | ||
package io.iohk.atala.prism.utils | ||
|
||
import java.security.SecureRandom | ||
|
||
object Utils { | ||
fun generateNonce(length: Int): String { | ||
var result = "" | ||
val secureRandom = SecureRandom() | ||
while (result.length < length) { | ||
val byte = ByteArray(1) | ||
secureRandom.nextBytes(byte) | ||
val int = byte[0].toInt() and 0xFF | ||
if (int > 250) { | ||
continue | ||
} | ||
val digit = int % 10 | ||
result += digit | ||
} | ||
return result | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
tests/end-to-end/src/test/resources/features/connection/CreateConnection.feature
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 @@ | ||
@connection | ||
Feature: Create connection | ||
The Edge Agent should be able to create a connection to prism-agent | ||
|
||
|
1 change: 1 addition & 0 deletions
1
tests/end-to-end/src/test/resources/features/credential/Anoncred.feature
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
1 change: 1 addition & 0 deletions
1
tests/end-to-end/src/test/resources/features/credential/Credential.feature
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
10 changes: 10 additions & 0 deletions
10
tests/end-to-end/src/test/resources/features/present-proof/AnoncredPresentProof.feature
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,10 @@ | ||
@proof @anoncred | ||
Feature: Respond to anoncred request proof | ||
The Edge Agent should be able to respond to an anoncred proof-of-request | ||
|
||
Scenario: Respond to anoncred request proof | ||
Given Cloud Agent is connected to Edge Agent | ||
And Edge Agent has '1' anonymous credentials issued by Cloud Agent | ||
When Cloud Agent asks for present-proof for anoncred | ||
And Edge Agent sends the present-proof | ||
Then Cloud Agent should see the present-proof is verified |
3 changes: 2 additions & 1 deletion
3
tests/end-to-end/src/test/resources/features/present-proof/PresentProof.feature
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,9 +1,10 @@ | ||
@proof @jwt | ||
Feature: Respond to request proof | ||
The Edge Agent should be able to respond to a proof-of-request | ||
|
||
Scenario: Respond to request proof | ||
Given Cloud Agent is connected to Edge Agent | ||
And Edge Agent has 1 credentials issued by Cloud Agent | ||
And Edge Agent has '1' credentials issued by Cloud Agent | ||
When Cloud Agent asks for present-proof | ||
And Edge Agent sends the present-proof | ||
Then Cloud Agent should see the present-proof is verified |