.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Crypt::X509 3pm" .TH Crypt::X509 3pm "2011-07-06" "perl v5.12.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Crypt::X509 \- Parse a X.509 certificate .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Crypt::X509; \& \& $decoded = Crypt::X509\->new( cert => $cert ); \& \& $subject_email = $decoded\->subject_email; \& print "do not use after: ".gmtime($decoded\->not_after)." GMT\en"; .Ve .SH "REQUIRES" .IX Header "REQUIRES" Convert::ASN1 .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBCrypt::X509\fR parses X.509 certificates. Methods are provided for accessing most certificate elements. .PP It is based on the generic \s-1ASN\s0.1 module by Graham Barr, on the \fIx509decode\fR example by Norbert Klasen and contributions on the perl-ldap-dev-Mailinglist by Chriss Ridd. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .SS "new ( \s-1OPTIONS\s0 )" .IX Subsection "new ( OPTIONS )" Creates and returns a parsed X.509 certificate hash, containing the parsed contents. The data is organised as specified in \s-1RFC\s0 2459. By default only the first \s-1ASN\s0.1 Layer is decoded. Nested decoding is done automagically through the data access methods. .ie n .IP "cert => $certificate" 4 .el .IP "cert => \f(CW$certificate\fR" 4 .IX Item "cert => $certificate" A variable containing the \s-1DER\s0 formatted certificate to be parsed (eg. as stored in \f(CW\*(C`usercertificate;binary\*(C'\fR attribute in an LDAP-directory). .PP .Vb 2 \& use Crypt::X509; \& use Data::Dumper; \& \& $decoded= Crypt::X509\->new(cert => $cert); \& \& print Dumper($decoded); .Ve .SH "METHODS" .IX Header "METHODS" .SS "error" .IX Subsection "error" Returns the last error from parsing, \f(CW\*(C`undef\*(C'\fR when no error occured. This error is updated on deeper parsing with the data access methods. .PP .Vb 4 \& $decoded= Crypt::X509\->new(cert => $cert); \& if ($decoded\->error) { \& warn "Error on parsing Certificate:".$decoded\->error; \& } .Ve .SH "DATA ACCESS METHODS" .IX Header "DATA ACCESS METHODS" You can access all parsed data directly from the returned hash. For convenience the following methods have been implemented to give quick access to the most-used certificate attributes. .SS "version" .IX Subsection "version" Returns the certificate's version as an integer. \s-1NOTE\s0 that version is defined as an Integer where 0 = v1, 1 = v2, and 2 = v3. .SS "version_string" .IX Subsection "version_string" Returns the certificate's version as a string value. .SS "serial" .IX Subsection "serial" returns the serial number (integer or Math::BigInt Object, that gets automagic evaluated in scalar context) from the certificate .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate has serial number:".$decoded\->serial."\en"; .Ve .SS "not_before" .IX Subsection "not_before" returns the GMT-timestamp of the certificate's beginning date of validity. If the Certificate holds this Entry in utcTime, it is guaranteed by the \&\s-1RFC\s0 to been correct. .PP As utcTime is limited to 32\-bit values (like unix-timestamps) newer certificates hold the timesamps as \*(L"generalTime\*(R"\-entries. \fBThe contents of \*(L"generalTime\*(R"\-entries are not well defined in the \s-1RFC\s0 and are returned by this module unmodified\fR, if no utcTime-entry is found. .PP .Vb 4 \& $decoded= Crypt::X509\->new(cert => $cert); \& if ($decoded\->notBefore < time()) { \& warn "Certificate: not yet valid!"; \& } .Ve .SS "not_after" .IX Subsection "not_after" returns the GMT-timestamp of the certificate's ending date of validity. If the Certificate holds this Entry in utcTime, it is guaranteed by the \&\s-1RFC\s0 to been correct. .PP As utcTime is limited to 32\-bit values (like unix-timestamps) newer certificates hold the timesamps as \*(L"generalTime\*(R"\-entries. \fBThe contents of \*(L"generalTime\*(R"\-entries are not well defined in the \s-1RFC\s0 and are returned by this module unmodified\fR, if no utcTime-entry is found. .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate expires on ".gmtime($decoded\->not_after)." GMT\en"; .Ve .SS "signature" .IX Subsection "signature" Return's the certificate's signature in binary \s-1DER\s0 format. .SS "pubkey" .IX Subsection "pubkey" Returns the certificate's public key in binary \s-1DER\s0 format. .SS "pubkey_size" .IX Subsection "pubkey_size" Returns the certificate's public key size. .SS "pubkey_algorithm" .IX Subsection "pubkey_algorithm" Returns the algorithm as \s-1OID\s0 string which the public key was created with. .SS "PubKeyAlg" .IX Subsection "PubKeyAlg" returns the subject public key encryption algorithm (e.g. '\s-1RSA\s0') as string. .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate public key is encrypted with:".$decoded\->PubKeyAlg."\en"; \& \& Example Output: Certificate public key is encrypted with: RSA .Ve .SS "pubkey_components" .IX Subsection "pubkey_components" If this certificate contains an \s-1RSA\s0 key, this function returns a hashref { modulus => \f(CW$m\fR, exponent => \f(CW$e\fR) from that key; each value in the hash will be an integer scalar or a Math::BigInt object. .PP For other pubkey types, it returns undef (implementations welcome!). .SS "sig_algorithm" .IX Subsection "sig_algorithm" Returns the certificate's signature algorithm as \s-1OID\s0 string .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate signature is encrypted with:".$decoded\->sig_algorithm."\en";> \& \& Example Output: Certificate signature is encrypted with: 1.2.840.113549.1.1.5 .Ve .SS "SigEncAlg" .IX Subsection "SigEncAlg" returns the signature encryption algorithm (e.g. '\s-1RSA\s0') as string. .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate signature is encrypted with:".$decoded\->SigEncAlg."\en"; \& \& Example Output: Certificate signature is encrypted with: RSA .Ve .SS "SigHashAlg" .IX Subsection "SigHashAlg" returns the signature hashing algorithm (e.g. '\s-1SHA1\s0') as string. .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Certificate signature is hashed with:".$decoded\->SigHashAlg."\en"; \& \& Example Output: Certificate signature is encrypted with: SHA1 .Ve .SS "Subject" .IX Subsection "Subject" returns a pointer to an array of strings containing subject nameparts of the certificate. Attributenames for the most common Attributes are translated from the OID-Numbers, unknown numbers are output verbatim. .PP .Vb 2 \& $decoded= Convert::ASN1::X509\->new($cert); \& print "DN for this Certificate is:".join(\*(Aq,\*(Aq,@{$decoded\->Subject})."\en"; .Ve .SS "subject_country" .IX Subsection "subject_country" Returns the string value for subject's country (= the value with the \s-1OID\s0 2.5.4.6 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`C=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no country attribute. .SS "subject_locality" .IX Subsection "subject_locality" Returns the string value for subject's locality (= the value with the \&\s-1OID\s0 2.5.4.7 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`l=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no locality attribute. .SS "subject_state" .IX Subsection "subject_state" Returns the string value for subject's state or province (= the value with the \&\s-1OID\s0 2.5.4.8 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`S=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no state attribute. .SS "subject_org" .IX Subsection "subject_org" Returns the string value for subject's organization (= the value with the \&\s-1OID\s0 2.5.4.10 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`O=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no organization attribute. .SS "subject_ou" .IX Subsection "subject_ou" Returns the string value for subject's organizational unit (= the value with the \&\s-1OID\s0 2.5.4.11 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`OU=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no organization attribute. .SS "subject_cn" .IX Subsection "subject_cn" Returns the string value for subject's common name (= the value with the \&\s-1OID\s0 2.5.4.3 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`CN=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no common name attribute. .SS "subject_email" .IX Subsection "subject_email" Returns the string value for subject's email address (= the value with the \&\s-1OID\s0 1.2.840.113549.1.9.1 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`E=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if subject contains no email attribute. .SS "Issuer" .IX Subsection "Issuer" returns a pointer to an array of strings building the \s-1DN\s0 of the certificate issuer (= the \s-1DN\s0 of the \s-1CA\s0). Attributenames for the most common Attributes are translated from the OID-Numbers, unknown numbers are output verbatim. .PP .Vb 2 \& $decoded= Crypt::X509\->new($cert); \& print "Certificate was issued by:".join(\*(Aq,\*(Aq,@{$decoded\->Issuer})."\en"; .Ve .SS "issuer_cn" .IX Subsection "issuer_cn" Returns the string value for issuer's common name (= the value with the \&\s-1OID\s0 2.5.4.3 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`CN=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no common name attribute. .SS "issuer_country" .IX Subsection "issuer_country" Returns the string value for issuer's country (= the value with the \s-1OID\s0 2.5.4.6 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`C=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no country attribute. .SS "issuer_state" .IX Subsection "issuer_state" Returns the string value for issuer's state or province (= the value with the \&\s-1OID\s0 2.5.4.8 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`S=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no state attribute. .SS "issuer_locality" .IX Subsection "issuer_locality" Returns the string value for issuer's locality (= the value with the \&\s-1OID\s0 2.5.4.7 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`L=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no locality attribute. .SS "issuer_org" .IX Subsection "issuer_org" Returns the string value for issuer's organization (= the value with the \&\s-1OID\s0 2.5.4.10 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`O=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no organization attribute. .SS "issuer_email" .IX Subsection "issuer_email" Returns the string value for issuer's email address (= the value with the \&\s-1OID\s0 1.2.840.113549.1.9.1 or in \s-1DN\s0 Syntax everything after \f(CW\*(C`E=\*(C'\fR). Only the first entry is returned. \f(CW\*(C`undef\*(C'\fR if issuer contains no email attribute. .SS "KeyUsage" .IX Subsection "KeyUsage" returns a pointer to an array of strings describing the valid Usages for this certificate. \f(CW\*(C`undef\*(C'\fR is returned, when the extension is not set in the certificate. .PP If the extension is marked critical, this is also reported. .PP .Vb 2 \& $decoded= Crypt::X509\->new(cert => $cert); \& print "Allowed usages for this Certificate are:\en".join("\en",@{$decoded\->KeyUsage})."\en"; \& \& Example Output: \& Allowed usages for this Certificate are: \& critical \& digitalSignature \& keyEncipherment \& dataEncipherment .Ve .SS "ExtKeyUsage" .IX Subsection "ExtKeyUsage" returns a pointer to an array of ExtKeyUsage strings (or OIDs for unknown OIDs) or \&\f(CW\*(C`undef\*(C'\fR if the extension is not filled. OIDs of the following ExtKeyUsages are known: serverAuth, clientAuth, codeSigning, emailProtection, timeStamping, OCSPSigning .PP If the extension is marked critical, this is also reported. .PP .Vb 2 \& $decoded= Crypt::X509\->new($cert); \& print "ExtKeyUsage extension of this Certificates is: ", join(", ", @{$decoded\->ExtKeyUsage}), "\en"; \& \& Example Output: ExtKeyUsage extension of this Certificates is: critical, serverAuth .Ve .SS "SubjectAltName" .IX Subsection "SubjectAltName" returns a pointer to an array of strings containing alternative Subjectnames or \&\f(CW\*(C`undef\*(C'\fR if the extension is not filled. Usually this Extension holds the e\-Mail address for person-certificates or DNS-Names for server certificates. .PP It also pre-pends the field type (ie rfc822Name) to the returned value. .PP .Vb 2 \& $decoded= Crypt::X509\->new($cert); \& print "E\-Mail or Hostnames in this Certificates is/are:", join(", ", @{$decoded\->SubjectAltName}), "\en"; \& \& Example Output: E\-Mail or Hostnames in this Certificates is/are: rfc822Name=user@server.com .Ve .SS "authorityCertIssuer" .IX Subsection "authorityCertIssuer" returns a pointer to an array of strings building the \s-1DN\s0 of the Authority Cert Issuer. Attributenames for the most common Attributes are translated from the OID-Numbers, unknown numbers are output verbatim. undef if the extension is not set in the certificate. .PP .Vb 2 \& $decoded= Crypt::X509\->new($cert); \& print "Certificate was authorised by:".join(\*(Aq,\*(Aq,@{$decoded\->authorityCertIssuer})."\en"; .Ve .SS "authority_serial" .IX Subsection "authority_serial" Returns the authority's certificate serial number. .SS "key_identifier" .IX Subsection "key_identifier" Returns the authority key identifier or undef if it is a rooted cert .SS "authority_cn" .IX Subsection "authority_cn" Returns the authority's ca. .SS "authority_country" .IX Subsection "authority_country" Returns the authority's country. .SS "authority_state" .IX Subsection "authority_state" Returns the authority's state. .SS "authority_locality" .IX Subsection "authority_locality" Returns the authority's locality. .SS "authority_org" .IX Subsection "authority_org" Returns the authority's organization. .SS "authority_email" .IX Subsection "authority_email" Returns the authority's email. .SS "CRLDistributionPoints" .IX Subsection "CRLDistributionPoints" Returns the \s-1CRL\s0 distribution points as an array of strings (with one value usually) .SS "CRLDistributionPoints2" .IX Subsection "CRLDistributionPoints2" Returns the \s-1CRL\s0 distribution points as an array of hashes (allowing for some variations) .SS "CertificatePolicies" .IX Subsection "CertificatePolicies" Returns the CertificatePolicies as an array of strings .SS "EntrustVersionInfo" .IX Subsection "EntrustVersionInfo" Returns the EntrustVersion as a string .PP .Vb 1 \& print "Entrust Version: ", $decoded\->EntrustVersion, "\en"; \& \& Example Output: Entrust Version: V7.0 .Ve .SS "SubjectDirectoryAttributes" .IX Subsection "SubjectDirectoryAttributes" Returns the SubjectDirectoryAttributes as an array of key = value pairs, to include a data type .PP .Vb 1 \& print "Subject Directory Attributes: ", join( \*(Aq, \*(Aq , @{ $decoded\->SubjectDirectoryAttributes } ), "\en"; \& \& Example Output: Subject Directory Attributes: 1.2.840.113533.7.68.29 = 7 (integer) .Ve .SS "BasicConstraints" .IX Subsection "BasicConstraints" Returns the BasicConstraints as an array and the criticallity pre-pended. .SS "subject_keyidentifier" .IX Subsection "subject_keyidentifier" Returns the subject key identifier from the extensions. .SS "SubjectInfoAccess" .IX Subsection "SubjectInfoAccess" Returns the SubjectInfoAccess as an array of hashes with key=value pairs. .PP .Vb 8 \& print "Subject Info Access: "; \& if ( defined $decoded\->SubjectInfoAccess ) { \& my %SIA = $decoded\->SubjectInfoAccess; \& for my $key ( keys %SIA ) { \& print "\en\et$key: \en\et"; \& print join( "\en\et" , @{ $SIA{$key} } ), "\en"; \& } \& } else { print "\en" } \& \& Example Output: \& Subject Info Access: \& 1.3.6.1.5.5.7.48.5: \& uniformResourceIdentifier = http://pki.treas.gov/root_sia.p7c \& uniformResourceIdentifier = ldap://ldap.treas.gov/ou=US%20Treasury%20Root%20CA,ou=Certification%20Authorities,ou=Department%20of%20the%20Treasury,o=U.S.%20Government,c=US?cACertificate;binary,crossCertificatePair;binary .Ve .SS "PGPExtension" .IX Subsection "PGPExtension" Returns the creation timestamp of the corresponding OpenPGP key. (see http://www.imc.org/ietf\-openpgp/mail\-archive/msg05320.html) .PP .Vb 5 \& print "PGPExtension: "; \& if ( defined $decoded\->PGPExtension ) { \& my $creationtime = $decoded\->PGPExtension; \& printf "\en\etcorresponding OpenPGP Creation Time: ", $creationtime, "\en"; \& } \& \& Example Output: \& PGPExtension: \& whatever .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" See the examples of \f(CW\*(C`Convert::ASN1\*(C'\fR and the Mailing List. An example on how to load certificates can be found in \fIt\eCrypt\-X509.t\fR. .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" This module is based on the x509decode script, which was contributed to Convert::ASN1 in 2002 by Norbert Klasen. .SH "AUTHORS" .IX Header "AUTHORS" Mike Jackson , Alexander Jung , Duncan Segrest .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2005 Mike Jackson . Copyright (c) 2001\-2002 Norbert Klasen, \s-1DAASI\s0 International GmbH. .PP All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.