コード例 #1
0
 def testAccessors(self):
   """Test for X509Data accessors"""
   st = ds.x509_issuer_serial_from_string(ds_data.TEST_X509_ISSUER_SERIAL)
   print(st)
   self.x509_data.x509_issuer_serial= st
   self.x509_data.x509_ski = ds.X509SKI(text="x509 ski")
   self.x509_data.x509_subject_name = ds.X509SubjectName(
                                               text="x509 subject name")
   self.x509_data.x509_certificate = ds.X509Certificate(
                                               text="x509 certificate")
   self.x509_data.x509_crl = ds.X509CRL(text="x509 crl")
   
   new_x509_data = ds.x509_data_from_string(self.x509_data.to_string())
   print(new_x509_data.keyswv())
   print(new_x509_data.__dict__.keys())
   assert new_x509_data.x509_issuer_serial
   assert isinstance(new_x509_data.x509_issuer_serial, ds.X509IssuerSerial)
   assert new_x509_data.x509_ski.text.strip() == "x509 ski"
   assert isinstance(new_x509_data.x509_ski, ds.X509SKI)
   assert new_x509_data.x509_subject_name.text.strip() == \
                "x509 subject name"
   assert isinstance(new_x509_data.x509_subject_name, ds.X509SubjectName)
   assert new_x509_data.x509_certificate.text.strip() == \
                "x509 certificate"
   assert isinstance(new_x509_data.x509_certificate, ds.X509Certificate)
   assert new_x509_data.x509_crl.text.strip() == "x509 crl"
   assert isinstance(new_x509_data.x509_crl,ds.X509CRL)
コード例 #2
0
 def testUsingTestData(self):
   """Test for x509_issuer_serial_from_string() using test data"""
   new_x509_issuer_serial = ds.x509_issuer_serial_from_string(
     ds_data.TEST_X509_ISSUER_SERIAL)
   assert new_x509_issuer_serial.x509_issuer_name.text.strip() == \
                "issuer name"
   assert new_x509_issuer_serial.x509_serial_number.text.strip() == "1"
コード例 #3
0
ファイル: test_00_xmldsig.py プロジェクト: blenderbox/pysaml2
    def testAccessors(self):
        """Test for X509Data accessors"""
        st = ds.x509_issuer_serial_from_string(ds_data.TEST_X509_ISSUER_SERIAL)
        print(st)
        self.x509_data.x509_issuer_serial = st
        self.x509_data.x509_ski = ds.X509SKI(text="x509 ski")
        self.x509_data.x509_subject_name = ds.X509SubjectName(text="x509 subject name")
        self.x509_data.x509_certificate = ds.X509Certificate(text="x509 certificate")
        self.x509_data.x509_crl = ds.X509CRL(text="x509 crl")

        new_x509_data = ds.x509_data_from_string(self.x509_data.to_string())
        print(new_x509_data.keyswv())
        print(new_x509_data.__dict__.keys())
        assert new_x509_data.x509_issuer_serial
        assert isinstance(new_x509_data.x509_issuer_serial, ds.X509IssuerSerial)
        assert new_x509_data.x509_ski.text.strip() == "x509 ski"
        assert isinstance(new_x509_data.x509_ski, ds.X509SKI)
        assert new_x509_data.x509_subject_name.text.strip() == "x509 subject name"
        assert isinstance(new_x509_data.x509_subject_name, ds.X509SubjectName)
        assert new_x509_data.x509_certificate.text.strip() == "x509 certificate"
        assert isinstance(new_x509_data.x509_certificate, ds.X509Certificate)
        assert new_x509_data.x509_crl.text.strip() == "x509 crl"
        assert isinstance(new_x509_data.x509_crl, ds.X509CRL)
コード例 #4
0
ファイル: test_00_xmldsig.py プロジェクト: blenderbox/pysaml2
 def testUsingTestData(self):
     """Test for x509_issuer_serial_from_string() using test data"""
     new_x509_issuer_serial = ds.x509_issuer_serial_from_string(ds_data.TEST_X509_ISSUER_SERIAL)
     assert new_x509_issuer_serial.x509_issuer_name.text.strip() == "issuer name"
     assert new_x509_issuer_serial.x509_serial_number.text.strip() == "1"