Feature/awesn2#434
Conversation
|
@iaik-jheher no use to review before awesn1 PRs are done. I'll then push a new awesn1-release and adapt whatever's needed here based on awesn1-feedback |
c3f0a3b to
97e9c56
Compare
fa07baf to
5a38136
Compare
3bfc8ea to
b3afcc8
Compare
Co-authored-by: Srdjan Stjepanovic <srdjan.stjepanovic@a-sit.at>
5221e7b to
76e17bc
Compare
| internal actual fun SignatureAlgorithm.RSA.getRSAPlatformSignatureInstance(provider: String?): Signature = | ||
| when (this.padding) { | ||
| RSAPadding.PKCS1 -> | ||
| SignatureAlgorithm.RSA.Padding.PKCS1 -> | ||
| sigGetInstance("${this.digest.jcaAlgorithmComponent}withRSA", provider) | ||
|
|
||
| RSAPadding.PSS -> | ||
| SignatureAlgorithm.RSA.Padding.PSS -> | ||
| sigGetInstance("${this.digest.jcaAlgorithmComponent}withRSA/PSS", provider) | ||
| } |
There was a problem hiding this comment.
is this not done via subclass switching on the parameters instance, now?
There was a problem hiding this comment.
this is just a shorthand that exposes the padding from the params, so it should amount to the same
| //TODO: extensible | ||
| enum class Kind { | ||
| EC, RSA | ||
| } | ||
|
|
||
| val kind: Kind |
There was a problem hiding this comment.
why do we need this? why can't we just is check against the class?
There was a problem hiding this comment.
because this is half-baked. I was going to move this to the public and private keys and reference it from the sigalg, so we'd have an alignment between key types, and signature algos, but also check it for asymmetric encryption, and key agreement. WDYT?
| override fun equals(other: Any?): Boolean { | ||
| if (this === other) return true | ||
| if (other !is CsrAttribute) return false | ||
| return oid == other.oid |
There was a problem hiding this comment.
same issue as that other comment about asymmetric equals; if you have a subclass that does not override equals this will break the symmetry contract on equals
Co-authored-by: Jakob Heher <jakob.heher@iaik.tugraz.at>
iaik-jheher
left a comment
There was a problem hiding this comment.
As I said async, approved conditional on the linked issues being fixed imminently and minimally. No new structural rewrites, just those issues being fixed at the issue site.
No description provided.