Projekt

Obecné

Profil

« Předchozí | Další » 

Revize d3bfacfc

Přidáno uživatelem Stanislav Král před asi 4 roky(ů)

Re #8573 - /api/certificates/{id}/public_key endpoint now does not extract public key from private key but does so directly from the certificate instead

Zobrazit rozdíly:

src/services/certificate_service.py
256 256
        """
257 257
        (subject, _, _) = self.cryptography_service.parse_cert_pem(certificate.pem_data)
258 258
        return subject
259

  
260
    def get_public_key_from_certificate(self, certificate: Certificate):
261
        """
262
        Extracts a public key from the given certificate
263
        :param certificate: an instance of the Certificate class containing the certificate from which a public key
264
        should be extracted.
265
        :return: a string containing the extracted public key in PEM format
266
        """
267
        return self.cryptography_service.extract_public_key_from_certificate(certificate.pem_data)

Také k dispozici: Unified diff