Sha256: a76a1345fda25702f987d44871aeeff749daae7d4b14c0912b981765999634ea

Contents?: true

Size: 938 Bytes

Versions: 2

Compression:

Stored size: 938 Bytes

Contents

module IOSConfigProfile
  class SecurityPayload < Hash
    include IOSConfigProfile::BasicPayload

    attr_accessor :content, :password

    def initialize(content, password)
      self.content = content
      self.password = password
      require_attributes :content, :password
      merge! security_payload
    end

    private

    def security_payload
      {
        "Password" => password,
        "PayloadUUID" => uuid,
        "PayloadContent" => StringIO.new(content),
        "PayloadCertificateFileName" => "identity.p12",

        "PayloadType" => "com.apple.security.pkcs12",
        "PayloadVersion" => 1,
        "PayloadIdentifier" => "#{IOSConfigProfile.root_domain}ipcu.profile.credential",
        "PayloadDisplayName" => "Security",
        "PayloadDescription" => "Provides device authentication (certificate or identity).",
        "PayloadOrganization" => IOSConfigProfile.organization,
      }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ios_config_profile-1.4.1 lib/ios_config_profile/device/security_payload.rb
ios_config_profile-1.4.0 lib/ios_config_profile/device/security_payload.rb