commit 2e99bad09035065604bb6f7ed901cee42d1e26b4
Author: Stanislav Král <stanislav.kral3@gmail.com>
Date:   Wed Mar 31 10:48:50 2021 +0200

    Re #8472 - Changed access modifier of create_csr method to private (was protected previously)

diff --git a/proj/services/cryptography.py b/proj/services/cryptography.py
index cb22f7a..3955d81 100644
--- a/proj/services/cryptography.py
+++ b/proj/services/cryptography.py
@@ -116,7 +116,7 @@ class CryptographyService:
 
             return self._run_for_output(args, proc_input=bytes(key, encoding="utf-8")).decode()
 
-    def _create_csr(self, subject, subject_key, subject_key_pass=""):
+    def __create_csr(self, subject, subject_key, subject_key_pass=""):
         """
         Creates a CSR (Certificate Signing Request)
 
@@ -188,7 +188,7 @@ class CryptographyService:
         :param days: number of days for which the certificate will be valid
         :return: string containing the generated certificate in PEM format
         """
-        csr = self._create_csr(subject, subject_key, subject_key_pass=subject_key_pass)
+        csr = self.__create_csr(subject, subject_key, subject_key_pass=subject_key_pass)
         return self._sign_csr(csr, issuer_pem, issuer_key, issuer_key_pass=issuer_key_pass, extensions=extensions,
                               days=days)
 
diff --git a/proj/tests/services/cryptography/make_csr_test.py b/proj/tests/services/cryptography/make_csr_test.py
index ff1f92e..acfaa69 100644
--- a/proj/tests/services/cryptography/make_csr_test.py
+++ b/proj/tests/services/cryptography/make_csr_test.py
@@ -12,7 +12,7 @@ def test_make_csr(service):
     private_key = service.create_private_key()
 
     subject = Subject(common_name="foo", country="CZ")
-    csr = service._create_csr(subject, private_key)
+    csr = service._CryptographyService__create_csr(subject, private_key)
 
     assert "Subject: CN = foo, C = CZ" in get_csr_pem(csr)
 
@@ -21,6 +21,6 @@ def test_make_csr_pkey_passphrase(service):
     private_key = service.create_private_key(passphrase="foobar")
 
     subject = Subject(common_name="foo", country="CZ", organization_unit="Mysterious Unit")
-    csr = service._create_csr(subject, private_key, subject_key_pass="foobar")
+    csr = service._CryptographyService__create_csr(subject, private_key, subject_key_pass="foobar")
 
     assert "Subject: CN = foo, C = CZ, OU = Mysterious Unit" in get_csr_pem(csr)
diff --git a/proj/tests/services/cryptography/sign_csr_test.py b/proj/tests/services/cryptography/sign_csr_test.py
index d16006d..79cfed2 100644
--- a/proj/tests/services/cryptography/sign_csr_test.py
+++ b/proj/tests/services/cryptography/sign_csr_test.py
@@ -18,7 +18,7 @@ def test_sign_csr(service):
 
     # create a private key to be used to make a CSR for the intermediate CA
     inter_key = service.create_private_key()
-    csr = service._create_csr(Subject(common_name="bar", country="CZ"), inter_key)
+    csr = service._CryptographyService__create_csr(Subject(common_name="bar", country="CZ"), inter_key)
 
     # sign the created CSR with root CA
     inter_ca = service._sign_csr(csr, root_ca, root_key)
@@ -38,7 +38,7 @@ def test_sign_csr_passphrase(service):
 
     # create a private key to be used to make a CSR for the intermediate CA
     inter_key = service.create_private_key()
-    csr = service._create_csr(Subject(common_name="bar", country="CZ"), inter_key)
+    csr = service._CryptographyService__create_csr(Subject(common_name="bar", country="CZ"), inter_key)
 
     # sign the created CSR with root CA and specify root key passphrase
     inter_ca = service._sign_csr(csr, root_ca, root_key, issuer_key_pass=root_key_passphrase)
@@ -70,7 +70,7 @@ def test_sign_csr_extensions(service):
 
     # create a private key to be used to make a CSR for the intermediate CA
     inter_key = service.create_private_key()
-    csr = service._create_csr(Subject(common_name="bar", country="CZ"), inter_key)
+    csr = service._CryptographyService__create_csr(Subject(common_name="bar", country="CZ"), inter_key)
 
     # sign the created CSR with root CA and specify root key passphrase and specify extensions (AIA and CA)
     inter_ca = service._sign_csr(csr, root_ca, root_key,
