1SMIME::JA(3)          User Contributed Perl Documentation         SMIME::JA(3)
2
3
4

NAME

6       Crypt::SMIME::JA - S/MIMEXXXXXXXXXXXXXX
7

XX

9         use Crypt::SMIME;
10
11         my $plain = <<'EOF';
12         From: alice@example.org
13         To: bob@example.com
14         Subject: Crypt::SMIME test
15
16         This is a test mail. Please ignore...
17         EOF
18
19         my $smime = Crypt::SMIME->new();
20         $smime->setPrivateKey($privkey, $crt);
21         # $smime->setPublicKey([$icacert]); # if need be.
22
23         my $signed = $smime->sign($plain);
24         print $signed;
25

XX

27       S/MIMEXXXXXXXXXXXXXXXXXXXXX libcrypto (<http://www.openssl.org>) XXXX
28
29   XXXX
30       new()
31             my $smime = Crypt::SMIME->new();
32
33           XXXX
34
35       setPrivateKey()
36             $smime->setPrivateKey($key, $crt);
37             $smime->setPrivateKey($key, $crt, $password);
38
39           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX
40
41           XXXXXXXXXXXXX PEM XXXXXXXXXXXXXXXXXdieXXX
42
43       setPublicKey()
44             $smime->setPublicKey($crt);
45             $smime->setPublicKey([$crt1, $crt2, ...]);
46
47           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
48
49           XXXXXXXXXXXXX PEM XXXXXXXXXXXXXXXXXdieXXX
50
51       sign()
52             $signed_mime = $smime->sign($raw_mime);
53
54           XXXXXXMIMEXXXXXXXXXXXXXXXXXXXXXXX
55
56           "Content-*", "MIME-*" XX "Subject" XXXXXXXX multipartXXXXXXXXXXXXX
57           "Subject" XS/MIMEXXXXXXXXXXXXXX, multipartX
58           XXXXXXXXXXXXXXXXXXXXXXXXXXX
59
60       signonly()
61             $sign = $smime->signonly($prepared_mime);
62
63           XXXXXXXXX $sign XBASE64XXXXXXXXXXXX $prepared_mime XX,
64           "prepareSmimeMessage" XXXXXXXXXX
65
66       prepareSmimeMessage()
67             ($prepared_mime, $outer_header)
68                 = $smime->prepareSmimeMessage($source_mime);
69
70           XXXXXXXXXXXXXXX $prepared_mime XXXXXXXXXXXMIMEXXXXXXXXX
71           $outer_header XXS/MIMEXXXXXXXXXXXXXXX
72
73           $prepared_mime XXXX$source_mimeXXXXXXXXX XXXXXXXX"Content-*",
74           "MIME-*", "Subject" XXXXXX XXXXXXXXXXXXXXXXX $outer_header XXXXXX
75           S/MIMEXXXXXXXXXXXXXXXXS/MIMEXXXXXXXXXXXXXXX "Subject" XXXXXX
76           $prepared_mime X $outer_header XXXX XXXXXXXX
77
78       check()
79             $source_mime = $smime->check($signed_mime);
80
81           XXXXXXXXXXXXXXXXXXXXXXXdieXXX
82
83       encrypt()
84             $encrypted_mime = $smime->encrypt($raw_mime);
85
86           XXXXXXX
87
88           "Content-*", "MIME-*" XX "Subject" XXXXXXXX
89           multipartXXXXXXXXXXXXXXX "Subject" XS/MIMEXXXXXXXXXXXXXX,
90           multipartX XXXXXXXXXXXXXXXXXXXXXXXXXXX
91
92       decrypt()
93             $decrypted_mime = $smime->decrypt($encrypted_mime);
94
95           XXXXXXXXXXXXXXXXXXXXXXXXXdieXXX
96
97       isSigned()
98             $is_signed = $smime->isSigned($mime);
99
100           XXXXMIMEXXXXXXS/MIMEXXXXXXXXXXXXXXX XXXXXXXXXXXXXXX
101           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX
102
103       isEncrypted()
104             $is_encrypted = $smime->isEncrypted($mime);
105
106           XXXXMIMEXXXXXXS/MIMEXXXXXXXXXXXXXXXX
107           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXX
108

XX

110       Copyright 2006-2007 YMIRLINK Inc. All Rights Reserved.
111
112       This library is free software; you can redistribute it and/or modify it
113       under the same terms as Perl itself
114
115       Bug reports and comments to: tl@tripletail.jp
116
117
118
119perl v5.12.1                      2008-10-02                      SMIME::JA(3)
Impressum