{"record":{"id":"b6be265bb86df878","repo":"puppetlabs/puppet","slug":"no-fips-140-2-compliant-digest-algorithm-in-openss","errorCode":null,"errorMessage":"No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest","messagePattern":"No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/ssl/certificate_signer.rb","lineNumber":25,"sourceCode":"# @api private\nclass Puppet::SSL::CertificateSigner\n  # @!attribute [r] digest\n  #   @return [OpenSSL::Digest]\n  attr_reader :digest\n\n  def initialize\n    if OpenSSL::Digest.const_defined?('SHA256')\n      @digest = OpenSSL::Digest::SHA256\n    elsif OpenSSL::Digest.const_defined?('SHA1')\n      @digest = OpenSSL::Digest::SHA1\n    elsif OpenSSL::Digest.const_defined?('SHA512')\n      @digest = OpenSSL::Digest::SHA512\n    elsif OpenSSL::Digest.const_defined?('SHA384')\n      @digest = OpenSSL::Digest::SHA384\n    elsif OpenSSL::Digest.const_defined?('SHA224')\n      @digest = OpenSSL::Digest::SHA224\n    else\n      raise Puppet::Error,\n            \"No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest\"\n    end\n  end\n\n  # Sign a certificate signing request (CSR) with a private key.\n  #\n  # @param [OpenSSL::X509::Request] content The CSR to sign\n  # @param [OpenSSL::X509::PKey] key The private key to sign with\n  #\n  # @api private\n  def sign(content, key)\n    content.sign(key, @digest.new)\n  end\nend\n","sourceCodeStart":7,"sourceCodeEnd":40,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/ssl/certificate_signer.rb#L7-L40","documentation":"Error \"No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/ssl/certificate_signer.rb:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}