lib/puppet/ssl/validator/default_validator.rb
##
# Decode a string of concatenated certificates
#
# @return [Array<OpenSSL::X509::Certificate>]
Decode a string of concatenated certificates
Decode a string of concatenated certificates
def decode_cert_bundle(bundle_str)
    re = /-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m
    pem_ary = bundle_str.scan(re)
    pem_ary.map do |pem_str|
      OpenSSL::X509::Certificate.new(pem_str)
    end
  end
def decode_cert_bundle ( bundle_str ) re = / -----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE----- /m pem_ary = bundle_str . scan ( re ) pem_ary . map do | pem_str | OpenSSL :: X509 :: Certificate . new ( pem_str ) end end
Decode a string of concatenated certificates
Decode a string of concatenated certificates
None
Array<OpenSSL::X509::Certificate>
bundle_str