Crypt-SMIME
view release on metacpan or search on metacpan
SMIME.mlpod view on Meta::CPAN
that is a list of headers to be moved to the top-level of MIME message. You
would rarely need to call this method directly.
J<< ja;
ç½²åç¨ã®ã¡ãã»ã¼ã¸ãæºåããã
C<$prepared_mime> ã«ã¯ç½²åç¨ã«ä¿®æ£ãããMIMEã¡ãã»ã¼ã¸ãè¿ãã
C<$outer_header> ã¯ãS/MIMEã®å¤å´ã«ä»ä¸ããããããè¿ãã
>>
The entity body of C<$source_mime> will be directly copied to
C<$prepared_mime>. Any headers of C<$source_mime> except C<Content-*>, C<MIME-*>
and C<Subject> will be copied to C<$prepared_mime>, and those excluded headers
will be copied to C<$outer_header>. Note that the C<Subject> header will be
copied to both side exceptionally.
J<< ja;
C<$prepared_mime> ã®æ¬æã¯C<$source_mime>ã¨åãç©ã¨ãªããã
ãããã«é¢ãã¦ã¯C<Content-*>, C<MIME-*>, C<Subject> ãé¤ãå
¨ã¦ã
åãé¤ããããåãé¤ãããããã㯠C<$outer_header> ã«è¿ãããã
S/MIMEã¡ãã»ã¼ã¸ãæ§ç¯ããéã«ã¯ãããS/MIMEã¡ãã»ã¼ã¸ã®ãããã«è¿½å ããã
C<Subject> ãããã®ã¿ã¯ C<$prepared_mime> 㨠C<$outer_header> ã®ä¸¡æ¹ã«
ç¾ããç¹ã«æ³¨æã
>>
=item check()
use Crypt::SMIME qw(:constants);
$source_mime = $smime->check($signed_mime);
$source_mime = $smime->check($signed_mime, $flags);
Verify a signature of S/MIME message and return a MIME message. The method dies
if it fails to verify it.
J<< ja;
æ¤è¨¼ãè¡ããæ¤è¨¼ã«å¤±æããå ´åã¯ãã®çç±ã¨å
±ã«dieããã
>>
When the option C<Crypt::SMIME::NO_CHECK_CERTIFICATE> is given as
C<$flags>, the signer's certificate chain is not verified. The default
value for C<$flags> is C<0>, which performs all the verifications.
J<< ja;
C<$flags> ã¨ã㦠C<Crypt::SMIME::NO_CHECK_CERTIFICATE>
ãªãã·ã§ã³ãæå®ããå ´åã«ã¯ãç½²åè
ã®è¨¼ææ¸ãã§ã¼ã³ãæ¤è¨¼ããªãã
C<$flags> ã®ããã©ã«ãå¤ã¯ C<0>
ã§ããããã®å ´åã«ã¯å
¨ã¦ã®æ´åæ§ã«ã¤ãã¦ã®æ¤è¨¼ãè¡ãã
>>
The resulting message will be tainted if the original S/MIME message,
the C<$flags>, verification time (L</"setAtTime()">) or at least one
of the provided public keys are tainted.
J<< ja;
å
ã® S/MIME ã¡ãã»ã¼ã¸, C<$flags>, æ¤è¨¼æå» (L</"setAtTime">), ã¾ãã¯
å
¬ééµã®å°ãªãã¨ãä¸ã¤ãæ±æããã¦ãã(tainted) ãªãã°ãæ¤è¨¼ãããã¡ãã»ã¼ã¸ãæ±æãããã
>>
=item encrypt()
$encrypted_mime = $smime->encrypt($raw_mime);
$encrypted_mime = $smime->encrypt($raw_mime, $cipher);
Encrypt a MIME message and return a S/MIME message. You can pass any
C<$cipher> string your OpenSSL library understands. Default is
"AES-128-CBC".
J<< ja;
æå·åãè¡ã. å©ç¨ãã¦ãã OpenSSL ã®çè§£ãããããªã©ã®ãã㪠C<$cipher>
ã§ãæå®ã§ãã. ããã©ã«ã㯠"AES-128-CBC" ã§ãã.
>>
Any headers except C<Content-*>, C<MIME-*> and C<Subject> will be moved to the
top-level of the MIME message. C<Subject> header will be copied to both of the
plain text part and the top-level for mail clients which can't properly handle
S/MIME messages.
J<< ja;
C<Content-*>, C<MIME-*> åã³ C<Subject> ãé¤ãããããã¯
multipartã®ãããã¬ãã«ã«ã³ãã¼ãããã
C<Subject> ã¯S/MIMEãèªèã§ããªãã¡ã¼ã©ã®ããã«, multipartã®
ãããã¬ãã«ã¨ä¿è·ãããã¡ãã»ã¼ã¸ã®ä¸¡å´ã«é
ç½®ãããã
>>
The resulting message will be tainted if the original MIME message or
at least one public key is tainted.
J<< ja;
å
ã® MIME ã¡ãã»ã¼ã¸ãã¾ãã¯å
¬ééµã®å°ãªãã¨ãä¸ã¤ãæ±æããã¦ãã
(tainted) ãªãã°ãæå·åãããã¡ãã»ã¼ã¸ãæ±æãããã
>>
=item decrypt()
$decrypted_mime = $smime->decrypt($encrypted_mime);
Decrypt an S/MIME and return a MIME message. This method dies if it fails to
decrypt it.
J<< ja;
復å·ãè¡ãã復å·ã«å¤±æããå ´åã¯ãã®çç±ã¨å
±ã«dieããã
>>
The resulting message will be tainted if any of the original S/MIME
message, the private key or its certificate is tainted.
J<< ja;
å
ã® S/MIME ã¡ãã»ã¼ã¸ãç§å¯éµãã¾ãã¯ãã®è¨¼ææ¸ã®ãããããæ±æããã¦ãã
(tainted) ãªãã°ã復å·ãããã¡ãã»ã¼ã¸ãæ±æãããã
>>
=item isSigned()
$is_signed = $smime->isSigned($mime);
Return true if the given string is a signed S/MIME message. Note that if the
message was encrypted after signing, this method returns false because in that
case the signature is hidden in the encrypted message.
J<< ja;
渡ãããMIMEã¡ãã»ã¼ã¸ãS/MIMEã§ç½²åããããã®ãªãçãè¿ãã
ã¯ãªã¢ç½²åãã©ããã¯åããªãã
ç½²åå¾ã«æå·åããã¡ãã»ã¼ã¸ã渡ããå ´åã¯ãç½²åãç´æ¥è¦ããªãçºã
å½ãè¿ãäºã«æ³¨æã
>>
=item isEncrypted()
$is_encrypted = $smime->isEncrypted($mime);
Return true if the given string is an encrypted S/MIME message. Note that if the
message was signed with non-detached signature after encryption, this method
returns false because in that case the encrypted message is hidden in the
signature.
J<< ja;
( run in 1.029 second using v1.01-cache-2.11-cpan-df04353d9ac )