Verifier
Verification API machinery.
Verifier(*, trusted_root)
The primary API for verification operations.
Create a new Verifier.
trusted_root is the TrustedRoot object containing the root of trust
for the verification process.
Source code in sigstore/verify/verifier.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
production(*, offline=False)
classmethod
Return a Verifier instance configured against Sigstore's production-level services.
offline controls the Trusted Root refresh behavior: if True,
the verifier uses the Trusted Root in the local TUF cache. If False,
a TUF repository refresh is attempted.
Source code in sigstore/verify/verifier.py
93 94 95 96 97 98 99 100 101 102 103 104 105 | |
staging(*, offline=False)
classmethod
Return a Verifier instance configured against Sigstore's staging-level services.
offline controls the Trusted Root refresh behavior: if True,
the verifier uses the Trusted Root in the local TUF cache. If False,
a TUF repository refresh is attempted.
Source code in sigstore/verify/verifier.py
107 108 109 110 111 112 113 114 115 116 117 118 119 | |
verify_dsse(bundle, policy)
Verifies an bundle's DSSE envelope, returning the encapsulated payload and its content type.
This method is only for DSSE-enveloped payloads. To verify
an arbitrary input against a bundle, use the verify_artifact
method.
bundle is the Sigstore Bundle to both verify and verify against.
policy is the VerificationPolicy to verify against.
Returns a tuple of (type, payload), where type is the payload's
type as encoded in the DSSE envelope and payload is the raw bytes
of the payload. No validation of either type or payload is
performed; users of this API must assert that type is known
to them before proceeding to handle payload in an application-dependent
manner.
Source code in sigstore/verify/verifier.py
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | |
verify_artifact(input_, bundle, policy)
Public API for verifying.
input_ is the input to verify, either as a buffer of contents or as
a prehashed Hashed object.
bundle is the Sigstore Bundle to verify against.
policy is the VerificationPolicy to verify against.
On failure, this method raises VerificationError.
Source code in sigstore/verify/verifier.py
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | |