Closed Xynnn007 closed 4 weeks ago
I've added _with_header
version of the methods that take a jwt::Header
as an argument. This removes the need to define different methods for each header/combination of header that might need to be added.
Please see https://github.com/veraison/rust-ear/pull/29
Resolved by https://github.com/veraison/rust-ear/pull/29
Due to spec https://www.ietf.org/archive/id/draft-ietf-rats-eat-31.html#section-9.6, an EAT'd better have some way to specify the trustworthy of the verification key. For now the APIs to serialize EAR to JWT is
I propose to add two more
sign_jwt_pem/der_with_kid(&self, alg: Algorithm, key: &[u8], kid: &str)
: This will do same thing withsign_jwt_pem/der
, but also it will fill the JWT'skid
header item, which will be used by the verifiers to look up their configured key store.sign_jwt_pem/der_with_jwk(&self, alg: Algorithm, key: &[u8], jwk: &[u8],x5c: Option<&str>)
: This will do same thing withsign_jwt_pem/der
withkey
. Thejwk
will be filled into the JWT'sjwk
header andx5c
be filled intox5c
extension if any. The two are used by the verifiers to verify the signature.x5c
together with the TrustRoot configured on the user side would be used to verify the trustworthy of the jwk.