• Home
  • Raw
  • Download

Lines Matching refs:resp

373         resp = builder.sign(private_key, hashes.SHA256())
374 assert resp.responder_name == root_cert.subject
375 assert resp.responder_key_hash is None
376 assert (current_time - resp.produced_at).total_seconds() < 10
377 assert (resp.signature_algorithm_oid ==
379 assert resp.certificate_status == ocsp.OCSPCertStatus.GOOD
380 assert resp.revocation_time is None
381 assert resp.revocation_reason is None
382 assert resp.this_update == this_update
383 assert resp.next_update == next_update
385 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
402 resp = builder.sign(private_key, hashes.SHA256())
403 assert resp.certificate_status == ocsp.OCSPCertStatus.REVOKED
404 assert resp.revocation_time == revoked_date
405 assert resp.revocation_reason is None
406 assert resp.this_update == this_update
407 assert resp.next_update == next_update
409 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
427 resp = builder.sign(private_key, hashes.SHA256())
428 assert resp.certificates == [root_cert]
443 resp = builder.sign(private_key, hashes.SHA256())
444 assert resp.certificate_status == ocsp.OCSPCertStatus.REVOKED
445 assert resp.revocation_time == revoked_date
446 assert resp.revocation_reason is None
447 assert resp.this_update == this_update
448 assert resp.next_update is None
450 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
468 resp = builder.sign(private_key, hashes.SHA256())
469 assert resp.certificate_status == ocsp.OCSPCertStatus.REVOKED
470 assert resp.revocation_time == revoked_date
471 assert resp.revocation_reason is x509.ReasonFlags.key_compromise
472 assert resp.this_update == this_update
473 assert resp.next_update == next_update
475 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
491 resp = builder.sign(private_key, hashes.SHA256())
492 assert resp.responder_name is None
493 assert resp.responder_key_hash == (
497 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
533 resp = builder.sign(private_key, hashes.SHA256())
534 assert len(resp.extensions) == 1
535 assert resp.extensions[0].value == x509.OCSPNonce(b"012345")
536 assert resp.extensions[0].critical is False
538 resp.signature, resp.tbs_response_bytes, ec.ECDSA(hashes.SHA256())
552 resp = ocsp.OCSPResponseBuilder.build_unsuccessful(status)
553 assert resp.response_status is status
554 assert resp.public_bytes(serialization.Encoding.DER) == der
573 resp = _load_data(
583 assert resp.response_status == ocsp.OCSPResponseStatus.SUCCESSFUL
584 assert (resp.signature_algorithm_oid ==
586 assert isinstance(resp.signature_hash_algorithm, hashes.SHA256)
587 assert resp.signature == base64.b64decode(
595 assert resp.tbs_response_bytes == base64.b64decode(
603 resp.signature,
604 resp.tbs_response_bytes,
606 resp.signature_hash_algorithm
608 assert resp.certificates == []
609 assert resp.responder_key_hash is None
610 assert resp.responder_name == issuer.subject
611 assert resp.produced_at == datetime.datetime(2018, 8, 30, 11, 15)
612 assert resp.certificate_status == ocsp.OCSPCertStatus.GOOD
613 assert resp.revocation_time is None
614 assert resp.revocation_reason is None
615 assert resp.this_update == datetime.datetime(2018, 8, 30, 11, 0)
616 assert resp.next_update == datetime.datetime(2018, 9, 6, 11, 0)
617 assert resp.issuer_key_hash == (
620 assert resp.issuer_name_hash == (
623 assert isinstance(resp.hash_algorithm, hashes.SHA1)
624 assert resp.serial_number == 271024907440004808294641238224534273948400
625 assert len(resp.extensions) == 0
628 resp = _load_data(
632 assert resp.response_status == ocsp.OCSPResponseStatus.UNAUTHORIZED
634 resp.signature_algorithm_oid
636 resp.signature_hash_algorithm
638 resp.signature
640 resp.tbs_response_bytes
642 resp.certificates
644 resp.responder_key_hash
646 resp.responder_name
648 resp.produced_at
650 resp.certificate_status
652 resp.revocation_time
654 resp.revocation_reason
656 resp.this_update
658 resp.next_update
660 resp.issuer_key_hash
662 resp.issuer_name_hash
664 resp.hash_algorithm
666 resp.serial_number
668 resp.extensions
671 resp = _load_data(
675 assert resp.certificate_status == ocsp.OCSPCertStatus.REVOKED
676 assert resp.revocation_time == datetime.datetime(
679 assert resp.revocation_reason is None
682 resp = _load_data(
686 assert len(resp.certificates) == 1
687 assert isinstance(resp.certificates[0], x509.Certificate)
688 assert resp.certificate_status == ocsp.OCSPCertStatus.UNKNOWN
691 resp = _load_data(
695 assert resp.signature_algorithm_oid == x509.ObjectIdentifier(
699 resp.signature_hash_algorithm
702 resp = _load_data(
706 assert resp.responder_name is None
707 assert resp.responder_key_hash == (
712 resp = _load_data(
716 assert resp.revocation_reason is x509.ReasonFlags.superseded
719 resp = _load_data(
723 assert resp.serial_number == 16160
724 assert resp.next_update is None
727 resp = _load_data(
731 assert len(resp.extensions) == 1
732 ext = resp.extensions[0]
744 resp = ocsp.load_der_ocsp_response(resp_bytes)
745 assert resp.public_bytes(serialization.Encoding.DER) == resp_bytes
748 resp = _load_data(
753 resp.public_bytes("invalid")
755 resp.public_bytes(serialization.Encoding.PEM)