def test_provider(self):
        provider = MetadataProvider(YUBICO_RESOLVER)
        cert = x509.load_der_x509_certificate(ATTESTATION_CERT,
                                              default_backend())
        attestation = provider.get_attestation(cert)

        assert attestation.trusted
    def test_transports_from_cert(self):
        provider = MetadataProvider(EMPTY_RESOLVER)
        cert = x509.load_der_x509_certificate(ATTESTATION_CERT_WITH_TRANSPORT,
                                              default_backend())
        attestation = provider.get_attestation(cert)

        assert attestation.transports == Transport.USB | Transport.NFC
    def test_provider(self):
        provider = MetadataProvider(YUBICO_RESOLVER)
        cert = x509.load_der_x509_certificate(ATTESTATION_CERT,
                                              default_backend())
        attestation = provider.get_attestation(cert)

        assert attestation.trusted
    def test_transports_from_cert(self):
        provider = MetadataProvider(EMPTY_RESOLVER)
        cert = x509.load_der_x509_certificate(ATTESTATION_CERT_WITH_TRANSPORT,
                                              default_backend())
        attestation = provider.get_attestation(cert)

        assert attestation.transports == Transport.USB | Transport.NFC
Ejemplo n.º 5
0
    def test_provider(self):
        provider = MetadataProvider()
        cert = X509.load_cert_der_string(ATTESTATION_CERT)
        attestation = provider.get_attestation(cert)

        assert attestation.trusted
    def test_provider(self):
        provider = MetadataProvider()
        cert = X509.load_cert_der_string(ATTESTATION_CERT)
        attestation = provider.get_attestation(cert)

        assert attestation.trusted
 def test_transports_from_metadata(self):
     provider = MetadataProvider(YUBICO_RESOLVER)
     cert = x509.load_der_x509_certificate(ATTESTATION_CERT,
                                           default_backend())
     attestation = provider.get_attestation(cert)
     assert attestation.transports == Transport.USB
 def test_transports_from_metadata(self):
     provider = MetadataProvider(YUBICO_RESOLVER)
     cert = x509.load_der_x509_certificate(ATTESTATION_CERT,
                                           default_backend())
     attestation = provider.get_attestation(cert)
     assert attestation.transports == Transport.USB