Skip to content

Overriding FIPS mode detection via env vars (GOFIPS=0) #2184

@nozomi-gedimitr

Description

@nozomi-gedimitr

We are building an application using Microsoft go which gets launched in k8s linux FIPS / non-FIPS environments. Our non-FIPS environment has the following peculiarity though:

  • The kernel reports that it is FIPS capable (i.e. /proc/sys/crypto/fips_enabled holds 1)
  • The OpenSSL library is configured in non-FIPS mode (i.e. there is no FIPS provider)

In this non-FIPS environment now, the application panics by default at launch time

panic: opensslcrypto: FIPS mode requested (system FIPS mode) but not available in OpenSSL 3.0.18 30 Sep 2025

Until now, we were working around this issue by setting the env var GOFIPS to 0. However, with the recent changes (and specifically with #1708), this possibility is getting removed.

I would like to ask:

  • Is there any other mechanism that we could use so that system detection of the FIPS mode is overridden?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    fipsquestionThis issue is a question about the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions