jose-jws-ver.1.adoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. jose-jws-ver(1)
  2. ===============
  3. :doctype: manpage
  4. == NAME
  5. jose-jws-ver - Verifies a JWS using the supplied JWKs
  6. == SYNOPSIS
  7. *jose jws ver* -i JWS [-I PAY] -k JWK [-a] [-O PAY]
  8. == OVERVIEW
  9. The *jose jws ver* command verifies a signature over a payload using one or
  10. more JWKs. When specifying more than one JWK (*-k*), the program will succeed
  11. when any of the provided JWKs successfully verify a signature. Alternatively,
  12. if the *-a* option is given, the program will succeed only when all JWKs
  13. successfully verify a signature.
  14. If the JWS is a detached JWS, meaning that the payload is stored in binary
  15. form external to the JWS itself, the payload can be loaded using the *-I*
  16. parameter.
  17. Please note that, when specifying the *-O* option to output the payload,
  18. the payload is output whether or not the signature validates. Therefore,
  19. you must check the return value of the command before trusting the data.
  20. == OPTIONS
  21. * *-i* _JSON_, *--input*=_JSON_ :
  22. Parse JWS from JSON
  23. * *-i* _FILE_, *--input*=_FILE_ :
  24. Read JWS from FILE
  25. * *-i* -, *--input*=- :
  26. Read JWS from standard input
  27. * *-I* _FILE_, *--detached*=_FILE_ :
  28. Read decoded payload from FILE
  29. * *-I* -, *--detached*=- :
  30. Read decoded payload from standard input
  31. * *-k* _FILE_, *--key*=_FILE_ :
  32. Read JWK(Set) from FILE
  33. * *-k* -, *--key*=- :
  34. Read JWK(Set) from standard input
  35. * *-O* _FILE_, *--detach*=_FILE_ :
  36. Decode payload to FILE
  37. * *-O* -, *--detach*=- :
  38. Decode payload to standard output
  39. * *-a*, *--all* :
  40. Ensure the JWS validates with all keys
  41. == EXAMPLES
  42. Verify a regular JWS and output the payload:
  43. $ jose jws ver -i msg.jws -k key.jwk -O msg.txt
  44. Verify a detached JWS without outputting the payload:
  45. $ jose jws ver -i msg.jws -I msg.txt -k key.jwk
  46. Ensure that a JWS is signed with all specified keys:
  47. $ jose jws ver -i msg.jws -k ec.jwk -k rsa.jwk -a
  48. == AUTHOR
  49. Nathaniel McCallum <npmccallum@redhat.com>
  50. == SEE ALSO
  51. link:jose-jws-fmt.1.adoc[*jose-jws-fmt*(1)],
  52. link:jose-jws-sig.1.adoc[*jose-jws-sig*(1)]