Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat Sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Go and FIPS 140-2 on Red Hat Enterprise Linux

June 24, 2019
Derek Parker
Related topics:
LinuxSecurityGo
Related products:
Red Hat Enterprise Linux

    Red Hat provides the Go programming language to Red Hat Enterprise Linux customers via the go-toolset package. If this package is new to you, and you want to learn more, check out some of the previous articles that have been written for some background.

    The go-toolset package is currently shipping Go version 1.11.x, with Red Hat planning to ship 1.12.x in Fall 2019. Currently, the go-toolset package only provides the Go toolchain (e.g., the compiler and associated tools like gofmt); however, we are looking into adding other tools to provide a more complete and full-featured Go development environment.

    In this article, I will talk about some of the improvements, changes, and exciting new features for go-toolset that we have been working on. These changes bring many upstream improvements and CVE fixes, as well as new features that we have been developing internally alongside upstream.

    FIPS 140-2 validated cryptography

    We are excited to announce that we plan to ship go-toolset with a new feature that allows Go to bypass the standard library cryptographic routines and instead call into a FIPS 140-2 validated cryptographic library. When your RHEL system is booted in FIPS mode, Go will instead call into OpenSSL via a new package that bridges between Go and OpenSSL. You can also enable it manually by setting GOLANG_FIPS=1 in your environment.

    This new feature builds on top of pre-existing upstream work (which instead calls into BoringSSL) and adds a few new features such as:

    • Ability to call into OpenSSL (v1.0.2 and v1.1.1)
    • Adherence to modern, up-to-date FIPS standards
    • Runtime detection of systems FIPS settings
    • Ability to enable FIPS mode manually
    • Stricter TLS that automatically uses only FIPS-approved ciphers
    • And more to come!

    This new feature of using OpenSSL for cryptography is only enabled if your system is booted in FIPS mode or if you explicitly enable it via GOLANG_FIPS=1; otherwise, there is no change and the standard library cryptography will be used. If you want to opt out of this feature altogether, you can build your programs with -tags no_openssl to disable it completely and build using pure upstream standard library cryptography. We are continuing to develop this feature and intend to propose new functionality in Go 2 to allow for using a FIPS-validated cryptographic module in a standardized way.

    Using go-toolset

    Getting started on RHEL7

    First, enable the correct repos:

    yum-config-manager --enable rhel-7-server-devtools-rpms && \
    yum-config-manager --enable rhel-7-server-rpms && \
    yum-config-manager --enable rhel-7-server-optional-rpms

    Next, install the package:

    yum install -y go-toolset-1.11

    Package go-toolset in RHEL7 provides Go as a Software Collection. To use the version of Go you have installed, you must enable it:

    scl enable go-toolset-1.11 go version

    Getting started on RHEL8

    For RHEL8, go-toolset is provided via the AppStream. To get started, simply type:

    yum install go-toolset

    This will install the Go 1.11.x toolchain.

    Notice that you do not have to specify the major.minor version as in RHEL7. Because the go-toolset is being shipped as a module in the AppStream, you are automatically subscribed to the RHEL8 stream, meaning any updates to the Go toolchain shipped on that stream are delivered directly to you.

    Additionally, the RHEL8 module is no longer a Software Collection. This means that in order to use your newly installed Go toolchain, you simply use the Go command as normal:

    go version

    Opting out

    To completely bypass and compile out all of these changes, you can build your programs with -tags no_openssl.

    For example:

    go build -tags no_openssl

    Wrapping up

    Here at Red Hat, we work hard to improve the tools our customers use by both providing and innovating new features and contributing back to the community. Stay tuned for updates on this work and more exciting news related to Go!

    Last updated: June 21, 2019

    Recent Posts

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    • Control multicluster costs with right-sizing in Red Hat Advanced Cluster Management 5

    • Lightbits is now certified for Red Hat OpenStack Services on OpenShift

    • What's new in Red Hat OpenShift 5 for developers

    • On-demand screen context in Red Hat Developer Hub intelligent assistant

    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI