Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 329216fe

Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)

Re #8585 - Fixed an issue where required extensions based on cert. usages were not present in the generated certificate

Created an utility that converts usages to extension configuration lines
Defined which extension field flags are required for certain usages

Zobrazit rozdíly:

src/services/cryptography.py
111 111

  
112 112
    def create_sscrt(self, subject, key, config="", extensions="", key_pass=None, days=30, sn: int = None):
113 113
        """
114
        Creates a root CA
114
        Creates a self signed certificate
115 115

  
116 116
        :param subject: an instance of <Subject> representing the subject to be added to the certificate
117 117
        :param key: private key of the CA to be used
......
132 132
        # file instead of an extension file. Therefore the following code creates
133 133
        # the most basic configuration file with sscrt_ext section, that is later
134 134
        # reference in openssl req command using -extensions option.
135
        extensions += "\n" + CA_EXTENSIONS
136 135
        if len(config) == 0:
137 136
            config += MINIMAL_CONFIG_FILE
138 137
        config += "\n[ " + SSCRT_SECTION + " ]" + "\n" + extensions

Také k dispozici: Unified diff