Class AcmeJwsVerifier
java.lang.Object
zeroecho.pki.server.acme.AcmeJwsVerifier
Strict narrow ACME flattened-JWS verifier supporting only ES256.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResolved durable account public key with exact revision commitment.static interfaceAccount lookup used only after strict KID framing.static final classSafe finite protocol failure, never carrying provider or parser details.static enumRequired protected-header account-key mode.static final recordVerified JWS data safe to pass to one closed endpoint decoder. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionkidRoutingHint(byte[] document, int maximumDocumentBytes, URI expectedUrl) Extracts a strictly framed KID only as a routing hint before full JWS verification.verify(byte[] document, int maximumDocumentBytes, URI expectedUrl, String nonceScope, AcmeJwsVerifier.KeyMode keyMode, AcmeNonceService nonces, AcmeJwsVerifier.AccountKeyResolver accounts) Verifies one complete flattened JWS against the exact configured external URL.verifyKeyChange(byte[] document, int maximumDocumentBytes, URI expectedUrl, String expectedAccountKid, String oldKeyThumbprint) Verifies the RFC key-change inner JWS signed by the replacement key.
-
Constructor Details
-
AcmeJwsVerifier
public AcmeJwsVerifier()Creates a stateless strict ACME JWS verifier.
-
-
Method Details
-
kidRoutingHint
Extracts a strictly framed KID only as a routing hint before full JWS verification. The returned value grants no authority and must be resolved and authenticated byverify(byte[], int, URI, String, KeyMode, AcmeNonceService, AccountKeyResolver).- Parameters:
document- flattened JWS documentmaximumDocumentBytes- positive encoded-document bound in bytesexpectedUrl- exact externally visible endpoint URL- Returns:
- untrusted KID routing hint
-
verify
public AcmeJwsVerifier.Verified verify(byte[] document, int maximumDocumentBytes, URI expectedUrl, String nonceScope, AcmeJwsVerifier.KeyMode keyMode, AcmeNonceService nonces, AcmeJwsVerifier.AccountKeyResolver accounts) Verifies one complete flattened JWS against the exact configured external URL. The admitted replay nonce is consumed before signature verification.- Parameters:
document- flattened JWS documentmaximumDocumentBytes- positive encoded-document bound in bytesexpectedUrl- exact externally visible endpoint URLnonceScope- canonical directory nonce scopekeyMode- required protected-header key modenonces- one-use replay-nonce serviceaccounts- exact account-key resolver- Returns:
- verified payload and signing authority
-
verifyKeyChange
public AcmeJwsVerifier.Verified verifyKeyChange(byte[] document, int maximumDocumentBytes, URI expectedUrl, String expectedAccountKid, String oldKeyThumbprint) Verifies the RFC key-change inner JWS signed by the replacement key.- Parameters:
document- flattened inner JWS documentmaximumDocumentBytes- positive encoded-document bound in bytesexpectedUrl- exact externally visible key-change URLexpectedAccountKid- exact existing-account KIDoldKeyThumbprint- authenticated old account-key thumbprint- Returns:
- verified payload and replacement-key authority
-