lib/sepa/utilities.rb
def format_cert(cert)
      cert = cert.to_s
      cert = cert.split('-----BEGIN CERTIFICATE-----')[1]
      cert = cert.split('-----END CERTIFICATE-----')[0]
      cert.gsub!(/\s+/, "")
    end
# Removes begin and end certificate texts from a certificate and removes whitespaces to make the
# certificate read to be embedded in xml.
#
# @param cert [#to_s] The certificate to be formatted
# @return [String] the formatted certificate
# @todo rename maybe
# @see #process_cert_value
Removes begin and end certificate texts from a certificate and removes whitespaces to make the
certificate read to be embedded in xml.
Removes begin and end certificate texts from a certificate and removes whitespaces to make the certificate read to be embedded in xml .
def format_cert(cert)
      cert = cert.to_s
      cert = cert.split('-----BEGIN CERTIFICATE-----')[1]
      cert = cert.split('-----END CERTIFICATE-----')[0]
      cert.gsub!(/\s+/, "")
    end
def format_cert ( cert ) cert = cert . to_s cert = cert . split ( '-----BEGIN CERTIFICATE-----' ) [ 1 ] cert = cert . split ( '-----END CERTIFICATE-----' ) [ 0 ] cert . gsub! ( / \s + / , "" ) end
Removes begin and end certificate texts from a certificate and removes whitespaces to make the
certificate read to be embedded in xml.
Removes begin and end certificate texts from a certificate and removes whitespaces to make the certificate read to be embedded in xml .
the formatted certificate
the formatted certificate
String
cert
The certificate to be formatted
The certificate to be formatted
todo
None
see
None