Skip to content

Undocumented dependency on specific OpenSSL version #144

@bdarnell

Description

@bdarnell

golang-fips/openssl is flexible in its support for OpenSSL versions; the version available at runtime does not have to match the version available at build time (https://github.com/golang-fips/openssl#portable-openssl). golang-fips/go does not have this property; _goboringcrypto_DLOPEN_OPENSSL loads only the version of the library that was available at build time (

+_goboringcrypto_DLOPEN_OPENSSL(void)
) What's worse, if the shared library fails to load, this is completely silent and the crypto package falls back to the non-fips-compliant Go implementations.

Is it possible for this repo to use the same tricks as golang-fips/openssl to be version-agnostic? If not, could the failure to load the expected openssl version be a panic instead of silently falling back to the wrong crypto implementations? At the very least this hidden dependency should be documented.

FYI I ran into this moving a binary between Red Hat's ubi9 (which uses OpenSSL 3.0) and ubi8 (which uses OpenSSL 1.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions