-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default JWK thumbprint algorithm to SHA-256
- Loading branch information
1 parent
1e14ff1
commit 55814f5
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,19 @@ a=`jose jwk thp -i $VECTORS/rfc7638_3.1.jwk -a S256` | |
b=`cat $VECTORS/rfc7638_3.1.thp` | ||
[ $a = $b ] | ||
|
||
jwk=`jose jwk thp -i $VECTORS/rfc7520_4.8.jwkset -f HYRNOxxOOHap0amTONoy1bHnS5M` | ||
jwk=`jose jwk thp -i $VECTORS/rfc7520_4.8.jwkset -a S1 -f HYRNOxxOOHap0amTONoy1bHnS5M` | ||
[ "`echo ${jwk} | jose jwk thp -i- -a S1`" = "HYRNOxxOOHap0amTONoy1bHnS5M" ] | ||
jose fmt -j "$jwk" -O \ | ||
-g kty -q EC -EUU \ | ||
-g crv -q P-521 -EUU \ | ||
-g kid -q [email protected] -EUU | ||
|
||
! jose jwk thp -i $VECTORS/rfc7520_4.8.jwkset -f VHriznG7vJAFpXMXRmGgAkA5sEE | ||
! jose jwk thp -i $VECTORS/rfc7520_4.8.jwkset -a S1 -f VHriznG7vJAFpXMXRmGgAkA5sEE | ||
|
||
# Check default thumbprint algorithm (SHA-256). | ||
RFC_7638_3_1="${VECTORS}/rfc7638_3.1" | ||
jwk="${RFC_7638_3_1}.jwk" | ||
thp256="${RFC_7638_3_1}.thp" | ||
[ "$(jose jwk thp -i ${jwk})" = "$(jose jwk thp -i ${jwk} -a S256)" ] | ||
[ "$(jose jwk thp -i ${jwk})" = "$(cat ${thp256})" ] | ||
|