You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifisinstance(cert.public_key(), rsa.RSAPublicKey):
e=int_to_bytes(cert.public_key().public_numbers().e)
n=int_to_bytes(cert.public_key().public_numbers().n)
elifisinstance(cert.public_key(), ec.EllipticCurvePublicKey):
x=int_to_bytes(cert.public_key().public_numbers().x)
y=int_to_bytes(cert.public_key().public_numbers().y)
# ...ifxandy:
key=CoseKey.from_dict(
{
KpKeyOps: [VerifyOp],
KpKty: KtyEC2,
EC2KpCurve: P256, # Ought o be pk.curve - but the two libs clashKpAlg: Es256, # ECDSA using P-256 and SHA-256EC2KpX: x,
EC2KpY: y,
}
)
elifeandn:
key=CoseKey.from_dict(
{
KpKeyOps: [VerifyOp],
KpKty: KtyRSA,
KpAlg: Ps256, # RSASSA-PSS using SHA-256 and MGF1 with SHA-256RSAKpE: e,
RSAKpN: n,
}
)
h1_verify.py
assumes that ECDSA is used for verification, see Digitaler-Impfnachweis/certification-apis#88 (comment) for context.The CI script used in https://github.com/eu-digital-green-certificates/dgc-testdata shows how RSASSA-PSS can be supported:
Source
The text was updated successfully, but these errors were encountered: