-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Allain Magyar <[email protected]>
- Loading branch information
1 parent
21cb994
commit 34755dd
Showing
12 changed files
with
603 additions
and
120 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
File renamed without changes.
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
20 changes: 20 additions & 0 deletions
20
E2E/e2eTests/Source/Features/AnoncredProofOfRequestFeature.swift
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,20 @@ | ||
import XCTest | ||
|
||
final class AnoncredProofOfRequestFeature: Feature { | ||
override func title() -> String { | ||
"Provide anonymous proof of request" | ||
} | ||
|
||
override func description() -> String { | ||
"The Edge Agent should provide anonymous proof to Cloud Agent" | ||
} | ||
|
||
func testRespondToProofOfRequest() async throws { | ||
currentScenario = Scenario("Respond to anonymous 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 anonymous present-proof") | ||
.and("Edge Agent sends the present-proof") | ||
.then("Cloud Agent should see the present-proof is verified") | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Foundation | ||
import XCTest | ||
|
||
class Utils { | ||
static func generateNonce(length: Int) -> String { | ||
var result: String = "" | ||
|
||
while (result.count < length) { | ||
var randomByte: UInt8 = 0 | ||
_ = SecRandomCopyBytes(kSecRandomDefault, 1, &randomByte) | ||
if (randomByte >= 250) { | ||
continue | ||
} | ||
let randomDigit = randomByte % 10 | ||
result += String(randomDigit) | ||
} | ||
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
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.