Skip to content

The copy constructor in the Certificate class lacks the assignment of m_issuer_der. #175

@JamesLebron

Description

@JamesLebron

The copy constructor in the Certificate class is missing the assignment of m_issuer_der, which will result in the loss of the copied m_issuer_der. This is a minor issue.

Certificate::Certificate(const Certificate& copy)
    : X509Document(copy),
      m_pem_chain(copy.m_pem_chain),
      m_certificate_chain(copy.m_certificate_chain),
      m_serial_number(copy.m_serial_number),
      m_serial_number_string(copy.m_serial_number_string),
      m_serial_number_hex_string(copy.m_serial_number_hex_string),
      m_validity_from(copy.m_validity_from),
      m_validity_to(copy.m_validity_to),
      m_issuer(copy.m_issuer),
      m_issuer_string(copy.m_issuer_string),
      m_issuer_der(copy.m_issuer_der),
      m_is_self_signed(copy.m_is_self_signed)
{
    // Duplicate OpenSSL object
    if (copy.m_openssl_object)
    {
        m_openssl_object = X509_dup(reinterpret_cast<X509*>(copy.m_openssl_object));
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions