-
Notifications
You must be signed in to change notification settings - Fork 61
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
SD-JWT implementation improvements #612
Conversation
I don't know why |
sd_alg: SdAlg, | ||
pointers: &[impl Borrow<JsonPointer>], | ||
) -> Result<(Self, Vec<DecodedDisclosure<'static>>), ConcealError> { | ||
let mut disclosures = Vec::new(); |
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.
Consider using Vec::with_capacity
, e.g.:
let mut disclosures = Vec::with_capacity(pointers.len());
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.
I don't know why
cargo-rdme
is unable to resolve some doc links 🤔
If you remove the leading crate::
it seems to work?
It does! Maybe it's a new version of |
aaand I found a bug just after merging of course: #614 |
This PR brings the SD-JWT implementation up to date with the rest of
ssi
.Main changes
Jwt
,JwtBuf
,DecodedJwt
, etc.RevealedSdJwt
.Other changes
CompactJWS
,CompactJWSBuf
,CompactJWSStr
andCompactJWSString
intoJwsSlice
,JwsVec
,JwsStr
andJwsString
. Tried to make the distinction and limitation of each clearer.Jws
/JwsBuf
type, that is now the base type for JWS, strictly following RFC 7515 without the RFC 7797 (Unencoded Payload Option) complications.ssi-jwt
.As a result, all
ssi-jws
,ssi-jwt
andssi-sd-jwt
share the same API patterns.There are a lot of changed files, but that's actually due to the renaming of JWS types. The most important changes are all located in
ssi-sd-jwt
. It's a bit lacking documentation for now, but ready for review. In the meantime, the tests are a good starting point to understand how it works.