Config::Apple::Profile::Payload::Certificate::PKCS12 - Bundle containing one certificate and its matching private key.
use Config::Apple::Profile; use Config::Apple::Profile::Payload::Certificate::PKCS12; my $cert = new Config::Apple::Profile::Payload::Certificate::PKCS12; $cert->payload->{PayloadIdentifier} = 'local.acme.key.user10'; $cert->payload->{PayloadDisplayName} = 'Private key & cert'; $cert->payload->{PayloadDescription} = 'The private key and certificate for employee #10'; $cert->payload->{PayloadOrganization} = 'Acme, Inc.'; $cert->payload->{PayloadCertificateFileName} = 'user10.p12'; $cert->payload->{Password} = 'Monkey123'; # DON'T DO THIS IN REAL LIFE!!! $cert->payload->{PayloadContent} = '.................'; # Binary data here my $profile = new Config::Apple::Profile; push @{$profile->content}, $cert; print $profile->export;
This class implements the PKCS12 type of Certificate payload.
This payload contains a single certificate, and the certificate's private key, in a PKCS#12 container. The container is encrypted with a password.
This payload is used to hold only one certificate. If you have any intermediate certificates, you will need to use a second Certificate payload (either a PEM or a PKCS1) to hold each intermediate certificate.
All of the payload keys defined in Config::Apple::Profile::Payload::Common::Certificate are used by this payload.
This payload has the following additional keys:
Password
This is the password needed to decrypt the PKCS#12 file. If no password is provided, the user will be prompted to enter the password when installing the profile.
WARNING: iOS 7 and 8 seem to have problems with identity certificates that do not have the Password key in the payload. More information, and status, are in https://github.com/akkornel/Config-Apple-Profile/issues/7.
PayloadType
This is fixed to the string com.apple.security.pkcs12.
com.apple.security.pkcs12
PayloadVersion
This is fixed to the value 1.
1
Refer to Config::Apple::Profile for acknowledgements.
A. Karl Kornel, <karl at kornel.us>
<karl at kornel.us>
Copyright © 2014 A. Karl Kornel.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Config::Apple::Profile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Apple::Profile
CPAN shell
perl -MCPAN -e shell install Config::Apple::Profile
For more information on module installation, please visit the detailed CPAN module installation guide.