-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Add scope to CertificateStore with issuerPrivateAddress #228
Conversation
@Throws(KeyStoreBackendException::class) | ||
suspend fun save(certificate: Certificate, chain: List<Certificate> = emptyList()) { | ||
suspend fun save( | ||
scope: Scope, |
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.
In all these methods, I think the scope shouldn't be the first param because it's secondary. For example:
save(cert, scope, ...)
.retrieveLatest(privateAddress, scope, ...)
- And so on
@@ -8,43 +8,55 @@ import tech.relaycorp.relaynet.wrappers.x509.Certificate | |||
|
|||
abstract class CertificateStore { | |||
|
|||
enum class Scope(val value: String) { |
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.
For consistency with the rest of the library, can you please make this a top level definition named CertificateScope
?
|
||
assertEquals(certificate, certificationPath.leafCertificate) | ||
assertEquals(certificateChain, certificationPath.chain) | ||
} | ||
|
||
@Test | ||
fun `Existing certification path of another scope should not be returned`() = runBlockingTest { |
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.
Please add a test like this for each of the other methods altered in this PR.
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.
Obrigado! LGTM 👍🏾
🎉 This PR is included in version 1.63.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Required for relaycorp/relaynet-gateway-android#571