1
0

jose-jwe-fmt 544 B

1234567891011121314151617181920
  1. #!/bin/sh -ex
  2. for f in $VECTORS/*.jwec; do
  3. cmpct=`cat $f`
  4. flat=`echo $f | sed 's|jwec|jwef|'`
  5. gen=`echo $f | sed 's|jwec|jweg|'`
  6. if [ -f $flat ]; then
  7. [ `jose jwe fmt -i $flat -c` = $cmpct ]
  8. [ `jose jwe fmt -i $flat | jose jwe fmt -i- -c` = $cmpct ]
  9. fi
  10. if [ -f $gen ]; then
  11. [ `jose jwe fmt -i $gen -c` = $cmpct ]
  12. [ `jose jwe fmt -i $gen | jose jwe fmt -i- -c` = $cmpct ]
  13. fi
  14. [ `jose jwe fmt -i $f -c` = $cmpct ]
  15. [ `jose jwe fmt -i $f | jose jwe fmt -i- -c` = $cmpct ]
  16. done