/usr/lib/exmh/pgpBase.tcl is in exmh 1:2.8.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | # pgpBase.tcl
#
# This file contains basic variables and procedures needed
# for the initialisation process
#
# $Log: pgpBase.tcl,v $
# Revision 1.9 2009/01/08 02:51:23 az143
# gpg since version 1.2 uses "gpg.conf" as configfile, not "options"
#
# Revision 1.8 2003/05/20 03:43:30 welch
# pgpPgp65.tcl added version check improvement for PGP 6.5 (Neil Rickert)
# (added . - and _ to the pattern, too (kre))
#
# Revision 1.7 2001/05/18 22:54:22 bmah
# Made the PGP detection code actually try to execute a program
# (e.g. "gpg --version") and parse the output to determine the presence
# of installed PGP versions. Formerly, only the existence of files
# was checked.
#
# For the most part, there shouldn't be any change, but this makes it easier
# to support PGP6 under FreeBSD (the FreeBSD Ports Collection installs PGP
# as /usr/local/bin/pgp).
#
# Revision 1.6 2000/06/16 18:16:26 valdis
# Various PGP fixes...
#
# Revision 1.5 2000/06/09 03:46:25 valdis
# PGP 6.5 support
#
# Revision 1.4 1999/08/24 15:51:07 bmah
# Patch from Kevin Christian to make email PGP key queries work, and
# to make key attachment RFC 2015 compliant.
#
# Revision 1.3 1999/08/22 18:17:08 bmah
# Email PGP queries now go out correctly. Use Exmh_Status to inform
# user of state of an outgoing email key query.
#
# Revision 1.2 1999/08/03 04:05:54 bmah
# Merge support for PGP2/PGP5/GPG from multipgp branch.
#
# Revision 1.1.4.3 1999/07/18 12:52:04 gruber
# *** empty log message ***
#
# Revision 1.1.4.2 1999/07/09 12:36:10 gruber
# few fixes
#
# Revision 1.1.4.1 1999/06/14 20:05:14 gruber
# updated multipgp interface
#
# Revision 1.1 1999/06/14 15:14:53 markus
# added files
#
proc Pgp_Base_Init {} {
global pgp miscRE env
###
# ---- For all versions ---- #
set miscRE(headerend) {^(--+.*--+)?$}
set miscRE(mimeheaders) {^content-[-a-z]+:}
set miscRE(true) {^(on|y(es)?|t(rue)?)$}
set miscRE(beginpgp) {^-+BEGIN PGP}
set miscRE(beginpgpkeys) {^-+BEGIN PGP PUBLIC KEY BLOCK-+$}
set miscRE(beginpgpclear) {^-+BEGIN PGP SIGNED MESSAGE-+$}
set pgp(enabled) 0
set pgp(pat_MenuInner) {Pgp}
set pgp(supportedversions) [list pgp pgp5 gpg pgp6]
# -- GnuPG -- #
set pgp(gpg,enabled) 0
set pgp(gpg,fullName) "GnuPG"
set pgp(gpg,executable,key) gpg
set pgp(gpg,executable,verify) gpg
set pgp(gpg,executable,encrypt) gpg
set pgp(gpg,executable,sign) gpg
set pgp(gpg,executable,version) gpg
set pgp(gpg,executable,versionflags) "--version"
set pgp(gpg,executable,versionregexp) "^gpg"
if [info exists env(GNUPGHOME)] {
set pgp(gpg,defaultPath) "$env(GNUPGHOME)"
} else {
set pgp(gpg,defaultPath) "$env(HOME)/.gnupg"
}
set pgp(gpg,configFile) "$pgp(gpg,defaultPath)/gpg.conf"
set pgp(gpg,pubring) "$pgp(gpg,defaultPath)/pubring.gpg"
set pgp(gpg,secring) "$pgp(gpg,defaultPath)/secring.gpg"
set pgp(gpg,pubringBkp) "$pgp(gpg,defaultPath)/pubring.gpg~"
set pgp(gpg,keyGenCmd) "rm -f $pgp(gpg,pubringBkp) && gpg --gen-key"
set pgp(gpg,ownPattern) ""
## ButtonMenuInner
set pgp(gpg,pat_MenuInner) {GPG}
## Version checking and Compatibilty
set pgp(gpg,pat_Version) "Version:\[ \t\]*(GNUPG|GnuPG).*"
set pgp(gpg,list_Alien) {pgp5 pgp6 pgp}
# -- PGP 2.6 -- #
set pgp(pgp,enabled) 0
set pgp(pgp,fullName) "PGP 2.6"
set pgp(pgp,executable,key) pgp
set pgp(pgp,executable,verify) pgp
set pgp(pgp,executable,encrypt) pgp
set pgp(pgp,executable,sign) pgp
set pgp(pgp,executable,version) pgp
set pgp(pgp,executable,versionflags) "-v"
set pgp(pgp,executable,versionregexp) "^Pretty Good Privacy.* 2\."
if [info exists env(PGPPATH)] {
set pgp(pgp,defaultPath) "$env(PGPPATH)"
} else {
set pgp(pgp,defaultPath) "$env(HOME)/.pgp"
}
set pgp(pgp,configFile) "$pgp(pgp,defaultPath)/config.txt"
set pgp(pgp,pubring) "$pgp(pgp,defaultPath)/pubring.pgp"
set pgp(pgp,secring) "$pgp(pgp,defaultPath)/secring.pgp"
set pgp(pgp,pubringBkp) "$pgp(pgp,defaultPath)/pubring.bak"
set pgp(pgp,keyGenCmd) "rm -f $pgp(pgp,pubringBkp) && pgp -kg"
set pgp(pgp,afterKeyGen) {
if {![file exists pgp(pgp,pubringBkp)]} {
return
} else {
set tmpfile [Mime_TempFile "pgp"]
Exec_GetKeys pgp \
[lindex [lindex $pgp(pgp,privatekeys) 0] 0] $tmpfile
Pgp_Misc_Send $pgp(pgp,keyserver) ADD $tmpfile \
"content-type: application/pgp; format=keys-only"
File_Delete $tmpfile
}
}
set pgp(pgp,ownPattern) ""
## ButtonMenuInner
set pgp(pgp,pat_MenuInner) {PGP[^5]}
## Version checking and Compatibilty
set pgp(pgp,pat_Version) "Version:\[ \t\]*2\.6.*"
set pgp(pgp,list_Alien) {pgp5 pgp6 gpg}
# -- PGP 5.0 -- #
set pgp(pgp5,enabled) 0
set pgp(pgp5,fullName) "PGP 5.0"
set pgp(pgp5,executable,key) pgpk
set pgp(pgp5,executable,verify) pgpv
set pgp(pgp5,executable,encrypt) pgpe
set pgp(pgp5,executable,sign) pgps
set pgp(pgp5,executable,version) pgpv
set pgp(pgp5,executable,versionflags) "--version"
set pgp(pgp5,executable,versionregexp) "^PGP.* unix5"
set pgp(pgp5,defaultPath) "$pgp(pgp,defaultPath)"
set pgp(pgp5,configFile) "$pgp(pgp5,defaultPath)/pgp.cfg"
set pgp(pgp5,pubring) "$pgp(pgp5,defaultPath)/pubring.pkr"
set pgp(pgp5,secring) "$pgp(pgp5,defaultPath)/secring.skr"
set pgp(pgp5,pubringBkp) "$pgp(pgp5,defaultPath)/pubring.bak"
set pgp(pgp5,keyGenCmd) "rm -f $pgp(pgp5,pubringBkp) && pgpk -g"
set pgp(pgp5,ownPattern) ""
## ButtonMenuInner
set pgp(pgp5,pat_MenuInner) {PGP5}
## Version checking and Compatibilty
set pgp(pgp5,pat_Version) "Version:\[ \t\]*((PGP\[^\n\]*)? 5\\.|PGPsdk).*"
set pgp(pgp5,list_Alien) {gpg pgp pgp6}
# -- PGP 6.5.n -- #
set pgp(pgp6,enabled) 0
set pgp(pgp6,fullName) "PGP 6.5"
set pgp(pgp6,executable,key) pgp6
set pgp(pgp6,executable,verify) pgp6
set pgp(pgp6,executable,encrypt) pgp6
set pgp(pgp6,executable,sign) pgp6
set pgp(pgp6,executable,version) pgp6
set pgp(pgp6,executable,versionflags) "-v"
set pgp(pgp6,executable,versionregexp) "^Pretty Good Privacy.* 6"
if [info exists env(PGPPATH)] {
set pgp(pgp6,defaultPath) "$env(PGPPATH)"
} else {
set pgp(pgp6,defaultPath) "$env(HOME)/.pgp"
}
set pgp(pgp6,configFile) "$pgp(pgp6,defaultPath)/config.txt"
set pgp(pgp6,pubring) "$pgp(pgp6,defaultPath)/pubring.pkr"
set pgp(pgp6,secring) "$pgp(pgp6,defaultPath)/secring.skr"
set pgp(pgp6,pubringBkp) "$pgp(pgp6,defaultPath)/pubring-bak-1.pkr"
set pgp(pgp6,keyGenCmd) "rm -f $pgp(pgp6,pubringBkp) && pgp6 -kg"
set pgp(pgp6,afterKeyGen) {
if {![file exists pgp(pgp6,pubringBkp)]} {
return
} else {
set tmpfile [Mime_TempFile "pgp"]
Exec_GetKeys pgp \
[lindex [lindex $pgp(pgp6,privatekeys) 0] 0] $tmpfile
Pgp_Misc_Send $pgp(pgp6,keyserver) ADD $tmpfile \
"content-type: application/pgp; format=keys-only"
File_Delete $tmpfile
}
}
# this is somewhat bogus, but seems to work...
set pgp(pgp6,ownPattern) "."
## ButtonMenuInner
set pgp(pgp6,pat_MenuInner) {PGP6}
## Version checking and Compatibilty
set pgp(pgp6,pat_Version) "Version:\[ \t-._A-Za-z\]*6\.5.*"
set pgp(pgp6,list_Alien) {pgp pgp5 gpg}
###
}
|