Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source info to TLS certificate assets and create them from host details #663

Merged
merged 36 commits into from
Aug 7, 2019

Commits on Jun 26, 2019

  1. No longer use trashcan for TLS certificates

    For consistency with other assets like OS and Hosts, TLS Certificates
    always deleted completely with delete_tls_certificate.
    timopollmeier committed Jun 26, 2019
    Configuration menu
    Copy the full SHA
    5865dd6 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2019

  1. Add tls_certificates sha256 and serial, drop trash

    This adds sha256_fingerprint and serial as table columns and params for
    get_certificate_info and also adds an incomplete migrator that drops the
    now unused tls_certificates_trash table and adds the new columns.
    
    The migrator will fail intentionally in this commit because more columns
    are to be added in following commits.
    timopollmeier committed Jun 27, 2019
    Configuration menu
    Copy the full SHA
    408cbcf View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2019

  1. Configuration menu
    Copy the full SHA
    c8f161f View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2019

  1. Configuration menu
    Copy the full SHA
    bb0c5cf View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2019

  1. Add parse_ssldetails function

    This can be used to get certificate data from "SSLDetails" host details.
    timopollmeier committed Jul 12, 2019
    Configuration menu
    Copy the full SHA
    019302d View commit details
    Browse the repository at this point in the history
  2. Init buffer_size in get_certificate_info

    This avoids possible issues with unitialized memory.
    Also the default certificate_format return has been clarified.
    timopollmeier committed Jul 12, 2019
    Configuration menu
    Copy the full SHA
    c2bcf35 View commit details
    Browse the repository at this point in the history
  3. Move tls_certificate_format_str to manage.c

    This makes it more consistent with the other certificate helper
    functions that do not perform any database operations.
    timopollmeier committed Jul 12, 2019
    Configuration menu
    Copy the full SHA
    a2869ce View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2019

  1. Configuration menu
    Copy the full SHA
    a1e2d39 View commit details
    Browse the repository at this point in the history
  2. Add SHA-256, serial, sources to TLS certificates

    The SHA-256 fingerprint is used by OpenVAS to identify certificates,
    the serial is also collected by the scanner and the source data
    can be used to associate certificates with certain hosts and reports.
    timopollmeier committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    04f17b6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3c6c13c View commit details
    Browse the repository at this point in the history
  4. Add IF NOT EXISTS to tls_certificate_sources

    The clause was missing in the create_tables() function.
    timopollmeier committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    a01e48e View commit details
    Browse the repository at this point in the history
  5. Add tls_certificate SHA256 and serial to GMP

    The get_tls_certificates command will now contain sha256_fingerprint
    and serial elements.
    timopollmeier committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    193d152 View commit details
    Browse the repository at this point in the history
  6. Change time helper functions to accept bigint

    TLS certificates use bigint because some expiry times may not fit into
    the limits of the integer type.
    timopollmeier committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    419774e View commit details
    Browse the repository at this point in the history
  7. Add last_collected to TLS certificates

    This gives the most recent time the certificate was found in a scan or
    imported.
    timopollmeier committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    7271943 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2019

  1. Add sources to TLS certificates GMP

    When details are requested, get_tls_certificates command will now return
    a list of sources giving the locations (hosts and ports) and origins
    (e.g. reports) where a certificate was found.
    timopollmeier committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    e53bbd7 View commit details
    Browse the repository at this point in the history
  2. Allow only to change name and comment of TLS certs

    The TLS certificate assets are meant to represent the actual certificate
    contents and replacing them with a different certificate would lead to
    incosistencies like no longer matching a certificate as found in a scan.
    timopollmeier committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    22dd7f0 View commit details
    Browse the repository at this point in the history
  3. Handle sources importing and deleting TLS certs

    The GMP commands create_tls_certificate and delete_tls_certificate now
    create/delete sources, locations and origins of the certificate.
    timopollmeier committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    7376f39 View commit details
    Browse the repository at this point in the history
  4. Check fingerprints when copying TLS certificates

    A TLS certificate is considered a duplicate if the current user has one
    with the same fingerprint but copying from other users is still allowed.
    timopollmeier committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    43a77b0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cd0cbcd View commit details
    Browse the repository at this point in the history
  6. Also copy sha256_fingerprint and serial

    The copy_tls_certificate function was missing these columns.
    timopollmeier committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    d143d6f View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2019

  1. Add function for TLS certificates from Base64 data

    The creation of the TLS certificate from Base64 encoded certificate data
    has been moved from create_tls_certificate to a new function that
    can be reused in other contexts like host details.
    timopollmeier committed Jul 31, 2019
    Configuration menu
    Copy the full SHA
    1dc11f8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    68be964 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2019

  1. Move TLS certificate creation to new function

    This separates the insertion of the tls_certificates row from getting
    the data from a Base64 encoded certificate.
    timopollmeier committed Aug 1, 2019
    Configuration menu
    Copy the full SHA
    56feb87 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2019

  1. Quote strings in TLS certificate helper functions

    The make_tls_certificate and user_tls_certificate_match_internal
    functions now quote the given certificate data because DNs can contain
    single quotes and other fields could contain other arbitrary text.
    timopollmeier committed Aug 5, 2019
    Configuration menu
    Copy the full SHA
    4d5f67f View commit details
    Browse the repository at this point in the history
  2. Document return value for make_tls_certificate

    This adds documentation of the return value of make_tls_certificate
    and make_tls_certificate_214.
    timopollmeier committed Aug 5, 2019
    Configuration menu
    Copy the full SHA
    2737434 View commit details
    Browse the repository at this point in the history
  3. Create TLS certificates from host details in scans

    Every time the scan of a host has finished, the collected host details
    will be used to create TLS certificate assets or amend them with new
    source information.
    timopollmeier committed Aug 5, 2019
    Configuration menu
    Copy the full SHA
    8e88b6c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26ff6e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2fab871 View commit details
    Browse the repository at this point in the history
  6. Clean up TLS certificate helper functions

    This removes some leftover test output, frees the decoded certificate
    content in add_tls_certificates_from_report_host and adds checks if
    make_tls_certificate was successful, also ensuring tls_certificate is
    defined.
    timopollmeier committed Aug 5, 2019
    Configuration menu
    Copy the full SHA
    f2dd059 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    38e18cd View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2019

  1. Configuration menu
    Copy the full SHA
    d6a42a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16640b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1910d90 View commit details
    Browse the repository at this point in the history
  4. Move parse_ssldetails, tls_certificate_format_str

    The functions have been moved from src/manage.c to the new file
    manage_tls_certificates.c.
    timopollmeier committed Aug 7, 2019
    Configuration menu
    Copy the full SHA
    11d20b7 View commit details
    Browse the repository at this point in the history
  5. Clean up TLS certificate migrator functions

    - Placing of the comma and inline comments is made more consistent.
    - Declaration and initialization of variables is separated in
     migrate_213_to_214.
    - Comments have been added to explain the iterators in the migrator.
    timopollmeier committed Aug 7, 2019
    Configuration menu
    Copy the full SHA
    620ba4b View commit details
    Browse the repository at this point in the history
  6. Clean up create_tls_certificate GMP doc

    The summary of the copy element had a superflous period.
    timopollmeier committed Aug 7, 2019
    Configuration menu
    Copy the full SHA
    1e59119 View commit details
    Browse the repository at this point in the history