lib/sepa/utilities.rb
# Takes a certificate, adds begin and end certificate texts and splits it into multiple lines so
# that OpenSSL can read it.
#
# @param cert_value [#to_s] the certificate to be processed
# @return [String] the processed certificate
# @todo rename maybe because this seems more formatting than {#format_cert}
Takes a certificate, adds begin and end certificate texts and splits it into multiple lines so
that OpenSSL can read it.
Takes a certificate adds begin and end certificate texts and splits it into multiple lines so that OpenSSL can read it .
def process_cert_value(cert_value)
      cert = "-----BEGIN CERTIFICATE-----\n"
      cert << cert_value.to_s.gsub(/\s+/, "").scan(/.{1,64}/).join("\n")
      cert << "\n"
      cert << "-----END CERTIFICATE-----"
    end
def process_cert_value ( cert_value ) cert = "-----BEGIN CERTIFICATE-----\n" cert << cert_value . to_s . gsub ( / \s + / , "" ) . scan ( / .{1,64} / ) . join ( "\n" ) cert << "\n" cert << "-----END CERTIFICATE-----" end
Takes a certificate, adds begin and end certificate texts and splits it into multiple lines so
that OpenSSL can read it.
Takes a certificate adds begin and end certificate texts and splits it into multiple lines so that OpenSSL can read it .
the processed certificate
the processed certificate
String
cert_value
the certificate to be processed
the certificate to be processed
todo
rename maybe because this seems more formatting than {#format_cert}
rename maybe because this seems more formatting than { #format_cert }