0

To create a cryptography.x509.PrecertificateSignedCertificateTimestamps, I need a list of certificate_transparency.SignedCertificateTimestamp, but I don't know how to do that, and what kind of information I need.

I'm making x509 certificate on my own, and all the information in the certificate are not real. I did this first:

    PrecertificateSignedCertificateTimestamps = x509.PrecertificateSignedCertificateTimestamps(
        [
        SignedCertificateTimestamp
        ]
    )

and then I find that:

class PrecertificateSignedCertificateTimestamps(ExtensionType):
    oid = ExtensionOID.PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS

    def __init__(
        self,
        signed_certificate_timestamps: typing.Iterable[
            SignedCertificateTimestamp
        ],
    )

and then I find

class SignedCertificateTimestamp(metaclass=abc.ABCMeta):
    @abc.abstractproperty
    def version(self) -> Version:
        """
        Returns the SCT version.
        """

    @abc.abstractproperty
    def log_id(self) -> bytes:
        """
        Returns an identifier indicating which log this SCT is for.
        """

    @abc.abstractproperty
    def timestamp(self) -> datetime.datetime:
        """
        Returns the timestamp for this SCT.
        """

    @abc.abstractproperty
    def entry_type(self) -> LogEntryType:
        """
        Returns whether this is an SCT for a certificate or pre-certificate.
        """

I find the relationship of these objects, but I don't know how to make it.

  • [This](https://github.com/synchronizing/mitm/blob/master/mitm/crypto.py) doesn't answer your question directly, but it might help creating 509x certificates & if needed, creating your own certificate authority. – felipe Feb 17 '23 at 04:08

0 Answers0