403Webshell
Server IP : 104.21.14.103  /  Your IP : 3.14.246.207
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/ssl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/ssl/certificate_signer.rb
# Take care of signing a certificate in a FIPS 140-2 compliant manner.
#
# @see https://projects.puppetlabs.com/issues/17295
#
# @api private
class Puppet::SSL::CertificateSigner

  # @!attribute [r] digest
  #   @return [OpenSSL::Digest]
  attr_reader :digest

  def initialize
    if OpenSSL::Digest.const_defined?('SHA256')
      @digest = OpenSSL::Digest::SHA256
    elsif OpenSSL::Digest.const_defined?('SHA1')
      @digest = OpenSSL::Digest::SHA1
    elsif OpenSSL::Digest.const_defined?('SHA512')
      @digest = OpenSSL::Digest::SHA512
    elsif OpenSSL::Digest.const_defined?('SHA384')
      @digest = OpenSSL::Digest::SHA384
    elsif OpenSSL::Digest.const_defined?('SHA224')
      @digest = OpenSSL::Digest::SHA224
    else
      raise Puppet::Error,
        "No FIPS 140-2 compliant digest algorithm in OpenSSL::Digest"
    end
    @digest
  end

  # Sign a certificate signing request (CSR) with a private key.
  #
  # @param [OpenSSL::X509::Request] content The CSR to sign
  # @param [OpenSSL::X509::PKey] key The private key to sign with
  #
  # @api private
  def sign(content, key)
    content.sign(key, @digest.new)
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit