Import Gnus v5.10.2.
[elisp/gnus.git-] / lisp / smime.el
1 ;;; smime.el --- S/MIME support library
2 ;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc.
3
4 ;; Author: Simon Josefsson <simon@josefsson.org>
5 ;; Keywords: SMIME X.509 PEM OpenSSL
6
7 ;; This file is part of GNU Emacs.
8
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published
11 ;; by the Free Software Foundation; either version 2, or (at your
12 ;; option) any later version.
13
14 ;; GNU Emacs is distributed in the hope that it will be useful, but
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 ;; General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
23
24 ;;; Commentary:
25
26 ;; This library perform S/MIME operations from within Emacs.
27 ;;
28 ;; Functions for fetching certificates from public repositories are
29 ;; provided, currently only from DNS.  LDAP support (via EUDC) is planned.
30 ;;
31 ;; It uses OpenSSL (tested with version 0.9.5a and 0.9.6) for signing,
32 ;; encryption and decryption.
33 ;;
34 ;; Some general knowledge of S/MIME, X.509, PKCS#12, PEM etc is
35 ;; probably required to use this library in any useful way.
36 ;; Especially, don't expect this library to buy security for you.  If
37 ;; you don't understand what you are doing, you're as likely to lose
38 ;; security than gain any by using this library.
39 ;;
40 ;; This library is not intended to provide a "raw" API for S/MIME,
41 ;; PKCSx or similar, it's intended to perform common operations
42 ;; done on messages encoded in these formats.  The terminology chosen
43 ;; reflect this.
44 ;;
45 ;; The home of this file is in Gnus CVS, but also available from
46 ;; http://josefsson.org/smime.html.
47
48 ;;; Quick introduction:
49
50 ;; Get your S/MIME certificate from VeriSign or someplace.  I used
51 ;; Netscape to generate the key and certificate request and stuff, and
52 ;; Netscape can export the key into PKCS#12 format.
53 ;;
54 ;; Enter OpenSSL.  To be able to use this library, it need to have the
55 ;; SMIME key readable in PEM format.  OpenSSL is used to convert the
56 ;; key:
57 ;;
58 ;; $ openssl pkcs12 -in mykey.p12 -clcerts -nodes > mykey.pem
59 ;; ...
60 ;;
61 ;; Now, use M-x customize-variable smime-keys and add mykey.pem as
62 ;; a key.
63 ;;
64 ;; Now you should be able to sign messages!  Create a buffer and write
65 ;; something and run M-x smime-sign-buffer RET RET and you should see
66 ;; your message MIME armoured and a signature.  Encryption, M-x
67 ;; smime-encrypt-buffer, should also work.
68 ;;
69 ;; To be able to verify messages you need to build up trust with
70 ;; someone.  Perhaps you trust the CA that issued your certificate, at
71 ;; least I did, so I export it's certificates from my PKCS#12
72 ;; certificate with:
73 ;;
74 ;; $ openssl pkcs12 -in mykey.p12 -cacerts -nodes > cacert.pem
75 ;; ...
76 ;;
77 ;; Now, use M-x customize-variable smime-CAs and add cacert.pem as a
78 ;; CA certificate.
79 ;;
80 ;; You should now be able to sign messages, and even verify messages
81 ;; sent by others that use the same CA as you.
82
83 ;; Bugs:
84 ;;
85 ;; Don't complain that this package doesn't do encrypted PEM files,
86 ;; submit a patch instead.  I store my keys in a safe place, so I
87 ;; didn't need the encryption.  Also, programming was made easier by
88 ;; that decision.  One might think that this even influenced were I
89 ;; store my keys, and one would probably be right. :-)
90 ;;
91 ;; Update: Mathias Herberts sent the patch.  However, it uses
92 ;; environment variables to pass the password to OpenSSL, which is
93 ;; slightly insecure. Hence a new todo: use a better -passin method.
94 ;;
95 ;; Cache password for e.g. 1h
96 ;;
97 ;; Suggestions and comments are appreciated, mail me at simon@josefsson.org.
98
99 ;; begin rant
100 ;;
101 ;; I would include pointers to introductory text on concepts used in
102 ;; this library here, but the material I've read are so horrible I
103 ;; don't want to recomend them.
104 ;;
105 ;; Why can't someone write a simple introduction to all this stuff?
106 ;; Until then, much of this resemble security by obscurity.
107 ;;
108 ;; Also, I'm not going to mention anything about the wonders of
109 ;; cryptopolitics.  Oops, I just did.
110 ;;
111 ;; end rant
112
113 ;;; Revision history:
114
115 ;; 2000-06-05  initial version, committed to Gnus CVS contrib/
116 ;; 2000-10-28  retrieve certificates via DNS CERT RRs
117 ;; 2001-10-14  posted to gnu.emacs.sources
118
119 ;;; Code:
120
121 (require 'dig)
122 (require 'comint)
123 (eval-when-compile (require 'cl))
124
125 (defgroup smime nil
126   "S/MIME configuration.")
127
128 (defcustom smime-keys nil
129   "*Map mail addresses to a file containing Certificate (and private key).
130 The file is assumed to be in PEM format. You can also associate additional
131 certificates to be sent with every message to each address."
132   :type '(repeat (list (string :tag "Mail address")
133                        (file :tag "File name")
134                        (repeat :tag "Additional certificate files"
135                                (file :tag "File name"))))
136   :group 'smime)
137
138 (defcustom smime-CA-directory nil
139   "*Directory containing certificates for CAs you trust.
140 Directory should contain files (in PEM format) named to the X.509
141 hash of the certificate.  This can be done using OpenSSL such as:
142
143 $ ln -s ca.pem `openssl x509 -noout -hash -in ca.pem`.0
144
145 where `ca.pem' is the file containing a PEM encoded X.509 CA
146 certificate."
147   :type '(choice (const :tag "none" nil)
148                  directory)
149   :group 'smime)
150
151 (defcustom smime-CA-file nil
152   "*Files containing certificates for CAs you trust.
153 File should contain certificates in PEM format."
154   :type '(choice (const :tag "none" nil)
155                  file)
156   :group 'smime)
157
158 (defcustom smime-certificate-directory "~/Mail/certs/"
159   "*Directory containing other people's certificates.
160 It should contain files named to the X.509 hash of the certificate,
161 and the files themself should be in PEM format."
162 ;The S/MIME library provide simple functionality for fetching
163 ;certificates into this directory, so there is no need to populate it
164 ;manually.
165   :type 'directory
166   :group 'smime)
167
168 (defcustom smime-openssl-program
169   (and (condition-case ()
170            (eq 0 (call-process "openssl" nil nil nil "version"))
171          (error nil))
172        "openssl")
173   "*Name of OpenSSL binary."
174   :type 'string
175   :group 'smime)
176
177 ;; OpenSSL option to select the encryption cipher
178
179 (defcustom smime-encrypt-cipher "-des3"
180   "*Cipher algorithm used for encryption."
181   :type '(choice (const :tag "Triple DES" "-des3")
182                  (const :tag "DES"  "-des")
183                  (const :tag "RC2 40 bits" "-rc2-40")
184                  (const :tag "RC2 64 bits" "-rc2-64")
185                  (const :tag "RC2 128 bits" "-rc2-128"))
186   :group 'smime)
187
188 (defcustom smime-dns-server nil
189   "*DNS server to query certificates from.
190 If nil, use system defaults."
191   :type '(choice (const :tag "System defaults")
192                  string)
193   :group 'smime)
194
195 (defvar smime-details-buffer "*OpenSSL output*")
196
197 ;; Use mm-util?
198 (eval-and-compile
199   (defalias 'smime-make-temp-file
200     (if (fboundp 'make-temp-file)
201         'make-temp-file
202       (lambda (prefix &optional dir-flag) ;; Simple implementation
203         (expand-file-name
204          (make-temp-name prefix)
205          (if (fboundp 'temp-directory)
206              (temp-directory)
207            temporary-file-directory))))))
208
209 ;; Password dialog function
210
211 (defun smime-ask-passphrase ()
212   "Asks the passphrase to unlock the secret key."
213   (let ((passphrase
214          (comint-read-noecho
215           "Passphrase for secret key (RET for no passphrase): " t)))
216     (if (string= passphrase "")
217         nil
218       passphrase)))
219
220 ;; OpenSSL wrappers.
221
222 (defun smime-call-openssl-region (b e buf &rest args)
223   (case (apply 'call-process-region b e smime-openssl-program nil buf nil args)
224     (0 t)
225     (1 (message "OpenSSL: An error occurred parsing the command options.") nil)
226     (2 (message "OpenSSL: One of the input files could not be read.") nil)
227     (3 (message "OpenSSL: An error occurred creating the PKCS#7 file or when reading the MIME message.") nil)
228     (4 (message "OpenSSL: An error occurred decrypting or verifying the message.") nil)
229     (t (error "Unknown OpenSSL exitcode") nil)))
230
231 (defun smime-make-certfiles (certfiles)
232   (if certfiles
233       (append (list "-certfile" (expand-file-name (car certfiles)))
234               (smime-make-certfiles (cdr certfiles)))))
235
236 ;; Sign+encrypt region
237
238 (defun smime-sign-region (b e keyfile)
239   "Sign region with certified key in KEYFILE.
240 If signing fails, the buffer is not modified.  Region is assumed to
241 have proper MIME tags.  KEYFILE is expected to contain a PEM encoded
242 private key and certificate as its car, and a list of additional
243 certificates to include in its caar.  If no additional certificates is
244 included, KEYFILE may be the file containing the PEM encoded private
245 key and certificate itself."
246   (smime-new-details-buffer)
247   (let ((keyfile (or (car-safe keyfile) keyfile))
248         (certfiles (and (cdr-safe keyfile) (cadr keyfile)))
249         (buffer (generate-new-buffer (generate-new-buffer-name " *smime*")))
250         (passphrase (smime-ask-passphrase))
251         (tmpfile (smime-make-temp-file "smime")))
252     (if passphrase
253         (setenv "GNUS_SMIME_PASSPHRASE" passphrase))
254     (prog1
255         (when (prog1
256                   (apply 'smime-call-openssl-region b e (list buffer tmpfile)
257                          "smime" "-sign" "-signer" (expand-file-name keyfile)
258                          (append
259                           (smime-make-certfiles certfiles)
260                           (if passphrase
261                               (list "-passin" "env:GNUS_SMIME_PASSPHRASE"))))
262                 (if passphrase
263                     (setenv "GNUS_SMIME_PASSPHRASE" "" t))
264                 (with-current-buffer smime-details-buffer
265                   (insert-file-contents tmpfile)
266                   (delete-file tmpfile)))
267           (delete-region b e)
268           (insert-buffer-substring buffer)
269           (goto-char b)
270           (when (looking-at "^MIME-Version: 1.0$")
271             (delete-region (point) (progn (forward-line 1) (point))))
272           t)
273       (with-current-buffer smime-details-buffer
274         (goto-char (point-max))
275         (insert-buffer-substring buffer))
276       (kill-buffer buffer))))
277
278 (defun smime-encrypt-region (b e certfiles)
279   "Encrypt region for recipients specified in CERTFILES.
280 If encryption fails, the buffer is not modified.  Region is assumed to
281 have proper MIME tags.  CERTFILES is a list of filenames, each file
282 is expected to contain of a PEM encoded certificate."
283   (smime-new-details-buffer)
284   (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*")))
285         (tmpfile (smime-make-temp-file "smime")))
286     (prog1
287         (when (prog1
288                   (apply 'smime-call-openssl-region b e (list buffer tmpfile)
289                          "smime" "-encrypt" smime-encrypt-cipher
290                          (mapcar 'expand-file-name certfiles))
291                 (with-current-buffer smime-details-buffer
292                   (insert-file-contents tmpfile)
293                   (delete-file tmpfile)))
294           (delete-region b e)
295           (insert-buffer-substring buffer)
296           (goto-char b)
297           (when (looking-at "^MIME-Version: 1.0$")
298             (delete-region (point) (progn (forward-line 1) (point))))
299           t)
300       (with-current-buffer smime-details-buffer
301         (goto-char (point-max))
302         (insert-buffer-substring buffer))
303       (kill-buffer buffer))))
304
305 ;; Sign+encrypt buffer
306
307 (defun smime-sign-buffer (&optional keyfile buffer)
308   "S/MIME sign BUFFER with key in KEYFILE.
309 KEYFILE should contain a PEM encoded key and certificate."
310   (interactive)
311   (with-current-buffer (or buffer (current-buffer))
312     (smime-sign-region
313      (point-min) (point-max)
314      (if keyfile
315          keyfile
316        (smime-get-key-with-certs-by-email
317         (completing-read
318          (concat "Sign using which key? "
319                  (if smime-keys (concat "(default " (caar smime-keys) ") ")
320                    ""))
321          smime-keys nil nil (car-safe (car-safe smime-keys))))))))
322
323 (defun smime-encrypt-buffer (&optional certfiles buffer)
324   "S/MIME encrypt BUFFER for recipients specified in CERTFILES.
325 CERTFILES is a list of filenames, each file is expected to consist of
326 a PEM encoded key and certificate.  Uses current buffer if BUFFER is
327 nil."
328   (interactive)
329   (with-current-buffer (or buffer (current-buffer))
330     (smime-encrypt-region
331      (point-min) (point-max)
332      (or certfiles
333          (list (read-file-name "Recipient's S/MIME certificate: "
334                                smime-certificate-directory nil))))))
335
336 ;; Verify+decrypt region
337
338 (defun smime-verify-region (b e)
339   "Verify S/MIME message in region between B and E.
340 Returns non-nil on success.
341 Any details (stdout and stderr) are left in the buffer specified by
342 `smime-details-buffer'."
343   (smime-new-details-buffer)
344   (let ((CAs (append (if smime-CA-file
345                          (list "-CAfile"
346                                (expand-file-name smime-CA-file)))
347                      (if smime-CA-directory
348                          (list "-CApath"
349                                (expand-file-name smime-CA-directory))))))
350     (unless CAs
351       (error "No CA configured"))
352     (if (apply 'smime-call-openssl-region b e (list smime-details-buffer t)
353                "smime" "-verify" "-out" "/dev/null" CAs)
354         t
355       (insert-buffer-substring smime-details-buffer)
356       nil)))
357
358 (defun smime-noverify-region (b e)
359   "Verify integrity of S/MIME message in region between B and E.
360 Returns non-nil on success.
361 Any details (stdout and stderr) are left in the buffer specified by
362 `smime-details-buffer'."
363   (smime-new-details-buffer)
364   (if (apply 'smime-call-openssl-region b e (list smime-details-buffer t)
365              "smime" "-verify" "-noverify" "-out" '("/dev/null"))
366       t
367     (insert-buffer-substring smime-details-buffer)
368     nil))
369
370 (eval-when-compile
371   (defvar from))
372
373 (defun smime-decrypt-region (b e keyfile)
374   "Decrypt S/MIME message in region between B and E with key in KEYFILE.
375 On success, replaces region with decrypted data and return non-nil.
376 Any details (stderr on success, stdout and stderr on error) are left
377 in the buffer specified by `smime-details-buffer'."
378   (smime-new-details-buffer)
379   (let ((buffer (generate-new-buffer (generate-new-buffer-name " *smime*")))
380         CAs (passphrase (smime-ask-passphrase))
381         (tmpfile (smime-make-temp-file "smime")))
382     (if passphrase
383         (setenv "GNUS_SMIME_PASSPHRASE" passphrase))
384     (if (prog1
385             (apply 'smime-call-openssl-region b e
386                    (list buffer tmpfile)
387                    "smime" "-decrypt" "-recip" (expand-file-name keyfile)
388                    (if passphrase
389                        (list "-passin" "env:GNUS_SMIME_PASSPHRASE")))
390           (if passphrase
391               (setenv "GNUS_SMIME_PASSPHRASE" "" t))
392           (with-current-buffer smime-details-buffer
393             (insert-file-contents tmpfile)
394             (delete-file tmpfile)))
395         (progn
396           (delete-region b e)
397           (when (boundp 'from)
398             ;; `from' is dynamically bound in mm-dissect.
399             (insert "From: " from "\n"))
400           (insert-buffer-substring buffer)
401           (kill-buffer buffer)
402           t)
403       (with-current-buffer smime-details-buffer
404         (insert-buffer-substring buffer))
405       (kill-buffer buffer)
406       (delete-region b e)
407       (insert-buffer-substring smime-details-buffer)
408       nil)))
409
410 ;; Verify+Decrypt buffer
411
412 (defun smime-verify-buffer (&optional buffer)
413   "Verify integrity of S/MIME message in BUFFER.
414 Uses current buffer if BUFFER is nil. Returns non-nil on success.
415 Any details (stdout and stderr) are left in the buffer specified by
416 `smime-details-buffer'."
417   (interactive)
418   (with-current-buffer (or buffer (current-buffer))
419     (smime-verify-region (point-min) (point-max))))
420
421 (defun smime-noverify-buffer (&optional buffer)
422   "Verify integrity of S/MIME message in BUFFER.
423 Does NOT verify validity of certificate (only message integrity).
424 Uses current buffer if BUFFER is nil. Returns non-nil on success.
425 Any details (stdout and stderr) are left in the buffer specified by
426 `smime-details-buffer'."
427   (interactive)
428   (with-current-buffer (or buffer (current-buffer))
429     (smime-noverify-region (point-min) (point-max))))
430
431 (defun smime-decrypt-buffer (&optional buffer keyfile)
432   "Decrypt S/MIME message in BUFFER using KEYFILE.
433 Uses current buffer if BUFFER is nil, and query user of KEYFILE if it's nil.
434 On success, replaces data in buffer and return non-nil.
435 Any details (stderr on success, stdout and stderr on error) are left
436 in the buffer specified by `smime-details-buffer'."
437   (interactive)
438   (with-current-buffer (or buffer (current-buffer))
439     (smime-decrypt-region
440      (point-min) (point-max)
441      (expand-file-name
442       (or keyfile
443           (smime-get-key-by-email
444            (completing-read
445             (concat "Decipher using which key? "
446                     (if smime-keys (concat "(default " (caar smime-keys) ") ")
447                       ""))
448             smime-keys nil nil (car-safe (car-safe smime-keys)))))))))
449
450 ;; Various operations
451
452 (defun smime-new-details-buffer ()
453   (with-current-buffer (get-buffer-create smime-details-buffer)
454     (erase-buffer)))
455
456 (defun smime-pkcs7-region (b e)
457   "Convert S/MIME message between points B and E into a PKCS7 message."
458   (smime-new-details-buffer)
459   (when (smime-call-openssl-region b e smime-details-buffer "smime" "-pk7out")
460     (delete-region b e)
461     (insert-buffer-substring smime-details-buffer)
462     t))
463
464 (defun smime-pkcs7-certificates-region (b e)
465   "Extract any certificates enclosed in PKCS7 message between points B and E."
466   (smime-new-details-buffer)
467   (when (smime-call-openssl-region
468          b e smime-details-buffer "pkcs7" "-print_certs" "-text")
469     (delete-region b e)
470     (insert-buffer-substring smime-details-buffer)
471     t))
472
473 (defun smime-pkcs7-email-region (b e)
474   "Get email addresses contained in certificate between points B and E.
475 A string or a list of strings is returned."
476   (smime-new-details-buffer)
477   (when (smime-call-openssl-region
478          b e smime-details-buffer "x509" "-email" "-noout")
479     (delete-region b e)
480     (insert-buffer-substring smime-details-buffer)
481     t))
482
483 ;; Utility functions
484
485 (defun smime-get-certfiles (keyfile keys)
486   (if keys
487       (let ((curkey (car keys))
488             (otherkeys (cdr keys)))
489         (if (string= keyfile (cadr curkey))
490             (caddr curkey)
491           (smime-get-certfiles keyfile otherkeys)))))
492
493 ;; Use mm-util?
494 (eval-and-compile
495   (defalias 'smime-point-at-eol
496     (if (fboundp 'point-at-eol)
497         'point-at-eol
498       'line-end-position)))
499
500 (defun smime-buffer-as-string-region (b e)
501   "Return each line in region between B and E as a list of strings."
502   (save-excursion
503     (goto-char b)
504     (let (res)
505       (while (< (point) e)
506         (let ((str (buffer-substring (point) (smime-point-at-eol))))
507           (unless (string= "" str)
508             (push str res)))
509         (forward-line))
510       res)))
511
512 ;; Find certificates
513
514 (defun smime-mail-to-domain (mailaddr)
515   (if (string-match "@" mailaddr)
516       (replace-match "." 'fixedcase 'literal mailaddr)
517     mailaddr))
518
519 (defun smime-cert-by-dns (mail)
520   (let* ((dig-dns-server smime-dns-server)
521          (digbuf (dig-invoke (smime-mail-to-domain mail) "cert" nil nil "+vc"))
522          (retbuf (generate-new-buffer (format "*certificate for %s*" mail)))
523          (certrr (with-current-buffer digbuf
524                    (dig-extract-rr (smime-mail-to-domain mail) "cert")))
525          (cert (and certrr (dig-rr-get-pkix-cert certrr))))
526       (if cert
527           (with-current-buffer retbuf
528             (insert "-----BEGIN CERTIFICATE-----\n")
529             (let ((i 0) (len (length cert)))
530               (while (> (- len 64) i)
531                 (insert (substring cert i (+ i 64)) "\n")
532                 (setq i (+ i 64)))
533               (insert (substring cert i len) "\n"))
534             (insert "-----END CERTIFICATE-----\n"))
535         (kill-buffer retbuf)
536         (setq retbuf nil))
537       (kill-buffer digbuf)
538       retbuf))
539
540 ;; User interface.
541
542 (defvar smime-buffer "*SMIME*")
543
544 (defvar smime-mode-map nil)
545 (put 'smime-mode 'mode-class 'special)
546
547 (unless smime-mode-map
548   (setq smime-mode-map (make-sparse-keymap))
549   (suppress-keymap smime-mode-map)
550
551   (define-key smime-mode-map "q" 'smime-exit)
552   (define-key smime-mode-map "f" 'smime-certificate-info))
553
554 (defun smime-mode ()
555   "Major mode for browsing, viewing and fetching certificates.
556
557 All normal editing commands are switched off.
558 \\<smime-mode-map>
559
560 The following commands are available:
561
562 \\{smime-mode-map}"
563   (interactive)
564   (kill-all-local-variables)
565   (setq major-mode 'smime-mode)
566   (setq mode-name "SMIME")
567   (setq mode-line-process nil)
568   (use-local-map smime-mode-map)
569   (buffer-disable-undo)
570   (setq truncate-lines t)
571   (setq buffer-read-only t))
572
573 (defun smime-certificate-info (certfile)
574   (interactive "fCertificate file: ")
575   (let ((buffer (get-buffer-create (format "*certificate %s*" certfile))))
576     (switch-to-buffer buffer)
577     (erase-buffer)
578     (call-process smime-openssl-program nil buffer 'display
579                   "x509" "-in" (expand-file-name certfile) "-text")
580     (fundamental-mode)
581     (set-buffer-modified-p nil)
582     (toggle-read-only t)
583     (goto-char (point-min))))
584
585 (defun smime-draw-buffer ()
586   (with-current-buffer smime-buffer
587     (let (buffer-read-only)
588       (erase-buffer)
589       (insert "\nYour keys:\n")
590       (dolist (key smime-keys)
591         (insert
592          (format "\t\t%s: %s\n" (car key) (cadr key))))
593       (insert "\nTrusted Certificate Authoritys:\n")
594       (insert "\nKnown Certificates:\n"))))
595
596 (defun smime ()
597   "Go to the SMIME buffer."
598   (interactive)
599   (unless (get-buffer smime-buffer)
600     (save-excursion
601       (set-buffer (get-buffer-create smime-buffer))
602       (smime-mode)))
603   (smime-draw-buffer)
604   (switch-to-buffer smime-buffer))
605
606 (defun smime-exit ()
607   "Quit the S/MIME buffer."
608   (interactive)
609   (kill-buffer (current-buffer)))
610
611 ;; Other functions
612
613 (defun smime-get-key-by-email (email)
614   (cadr (assoc email smime-keys)))
615
616 (defun smime-get-key-with-certs-by-email (email)
617   (cdr (assoc email smime-keys)))
618
619 (provide 'smime)
620
621 ;;; smime.el ends here