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 )