The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Config::Apple::Profile::Payload::Certificate::PKCS1 - Certificate payload with a DER-format certificate.

SYNOPSIS

    use Config::Apple::Profile;
    use Config::Apple::Profile::Payload::Certificate::PKCS1;
    
    my $cert = new Config::Apple::Profile::Payload::Certificate::PKCS1;
    $cert->payload->{PayloadIdentifier} = 'local.acme.CAcert';
    $cert->payload->{PayloadDisplayName} = 'AcmeCorp internal CA';
    $cert->payload->{PayloadDescription} = 'The certificate authority used for internal web sites.';
    $cert->payload->{PayloadOrganization} = 'Acme, Inc.';
    $cert->payload->{PayloadCertificateFileName} = 'acme.crt'; 
    $cert->payload->{PayloadContent} = '.............'; # Long binary data here
    
    my $profile = new Config::Apple::Profile;
    push @{$profile->content}, $cert;
    
    print $profile->export;
    

DESCRIPTION

This class implements the pkcs1 type of Certificate payload.

This payload contains a single certificate, in a PKCS#1 container, DER-encoded. For reference, pretty much any certificate you get, when you are just getting a certificate, will be in a PKCS#1 container. DER encoding is a binary encoding, it's not the "BEGIN CERTIFICATE" type of encoding (that's PEM).

This payload is used to hold only one certificate. If you have multiple certificates, use multiple payloads.

NOTE: This type is exactly the same as the root type of Certificate payload.

INSTANCE METHODS

The following instance methods are provided, or overridden, by this class.

validate_key($key, $value)

Performs additional validation for a certain payload key in this class:

  • PayloadContent

    This must be a DER-format certificate that OpenSSL can recognize.

    All other payload keys will be checked as usual by the parent class.

See also the documentation in Config::Apple::Profile::Payload::Common.

PAYLOAD KEYS

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:

PayloadType

This is fixed to the string com.apple.security.root.

PayloadVersion

This is fixed to the value 1.

ACKNOWLEDGEMENTS

Refer to Config::Apple::Profile for acknowledgements.

AUTHOR

A. Karl Kornel, <karl at kornel.us>

COPYRIGHT AND LICENSE

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.