コード例 #1
0
ファイル: test_validators.py プロジェクト: Daviey/barbican
 def test_should_raise_with_signed_wrong_key_pkcs10_data(self):
     self.meta['request_data'] = base64.b64encode(
         certs.create_csr_signed_with_wrong_key())
     self._set_order()
     self.assertRaises(excep.InvalidPKCS10Data,
                       self.validator.validate,
                       self.order_req)
コード例 #2
0
    def test_create_simple_csc_order_with_pkcs10_signed_by_wrong_key(self):
        test_model = order_models.OrderModel(**self.simple_cmc_data)
        test_model.meta['request_data'] = base64.b64encode(
            certutil.create_csr_signed_with_wrong_key())

        create_resp, order_ref = self.behaviors.create_order(test_model)
        self.assertEqual(400, create_resp.status_code)
        self.confirm_error_message(
            create_resp, "Invalid PKCS10 Data: Signing key incorrect")
コード例 #3
0
    def test_create_simple_csc_order_with_pkcs10_signed_by_wrong_key(self):
        test_model = order_models.OrderModel(**self.simple_cmc_data)
        test_model.meta['request_data'] = (
            certutil.create_csr_signed_with_wrong_key())

        create_resp, order_ref = self.behaviors.create_order(test_model)
        self.assertEqual(400, create_resp.status_code)
        self.confirm_error_message(
            create_resp,
            "Invalid PKCS10 Data: Signing key incorrect"
        )
コード例 #4
0
 def test_should_raise_with_signed_wrong_key_pkcs10_data(self):
     self.meta['request_data'] = base64.b64encode(
         certs.create_csr_signed_with_wrong_key())
     self._set_order()
     self.assertRaises(excep.InvalidPKCS10Data, self.validator.validate,
                       self.order_req)