lib/puppet/provider/mobileconfig.rb
# Validates a String as a com.apple.security.pkcs1 Certificate Payload
# - will decode Base64 if it can
Validates a String as a com.apple.security.pkcs1 Certificate Payload
will decode Base64 if it can
Validates a String as a com . apple . security . pkcs1 Certificate Payload will decode Base64 if it can
def parse_cert_data_from_string(string)
    begin
      OpenSSL::X509::Certificate.new string
    rescue OpenSSL::X509::CertificateError
      begin
        string = Base64.decode64(string)
        OpenSSL::X509::Certificate.new string
      rescue OpenSSL::X509::CertificateError => e
        raise Puppet::Error, "##{__method__}:
          Could not parse certificate data! [#{e.message}]"
      end
    end
    string
  end
def parse_cert_data_from_string ( string ) begin OpenSSL :: X509 :: Certificate . new string rescue OpenSSL :: X509 :: CertificateError begin string = Base64 . decode64 ( string ) OpenSSL :: X509 :: Certificate . new string rescue OpenSSL :: X509 :: CertificateError => e raise Puppet :: Error , "##{__method__}:
          Could not parse certificate data! [#{e.message}]" end end string end
Validates a String as a com.apple.security.pkcs1 Certificate Payload
 will decode Base64 if it can
Validates a String as a com . apple . security . pkcs1 Certificate Payload will decode Base64 if it can
string