mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner Koch
This commit is contained in:
parent
b1e5c79926
commit
750d74333c
22
AUTHORS
22
AUTHORS
@ -59,14 +59,20 @@ This program uses the zlib compression library written by
|
||||
Jean-loup Gailly and Mark Adler.
|
||||
|
||||
Most of the stuff in mpi has been taken from the GMP library.
|
||||
[Who is the author??]
|
||||
|
||||
The file cipher/rndunix.c is heavily based on Peter Gutmann's
|
||||
rndunix.c from cryptlib. - He promised to add the GPL as an alternative
|
||||
license to this and some other files. We don't have a disclaimer for
|
||||
this file, but due to the fact that this is only needed for non-free
|
||||
system we can easily remove this from the distribution and put it as
|
||||
a module on some FTP server.
|
||||
The keybox implementation is based on GDBM 1.7.3 by Philip A. Nelson.
|
||||
|
||||
The RPM specs file scripts/gnupg.specs has been contributed by
|
||||
Caskey L. Dickson and Reuben Sumner.
|
||||
The file cipher/rndunix.c is based on Peter Gutmann's rndunix.c from
|
||||
cryptlib. - He promised to add the GPL as an alternative license to
|
||||
this and some other files. We don't have a disclaimer yet, but due
|
||||
to the fact that this is only needed for non-free systems we can
|
||||
easily remove this from the distribution and put it as an extra module
|
||||
on the FTP server.
|
||||
|
||||
The files in debian/ are by James Troup who is the Debian maintainer
|
||||
for GnuPG.
|
||||
|
||||
The RPM specs file scripts/gnupg.spec has been contributed by
|
||||
several people.
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
Wed Dec 23 13:18:14 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* README: Replaced the command overview with a short intro.
|
||||
|
||||
Sat Dec 12 18:40:32 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* configure.in: Add check for dlopen in libc (Greg Troxel)
|
||||
|
15
INSTALL
15
INSTALL
@ -54,9 +54,6 @@ Don't forget to delete "config.cache" and run "./config.status --recheck".
|
||||
|
||||
The Random Device
|
||||
=================
|
||||
The current version of GNUPG needs the support of a random device.
|
||||
If there is no such device, it uses a very simple RNG, which does
|
||||
not generate strong random numbers.
|
||||
Random devices are available in Linux, FreeBSD and OpenBSD.
|
||||
The device files may not exist on your system, please check this
|
||||
and create them if needed.
|
||||
@ -75,6 +72,18 @@ You can create them with:
|
||||
mknod /dev/random c 2 3
|
||||
mknod /dev/urandom c 2 4
|
||||
|
||||
Unices without a random devices must use another entropy collector
|
||||
which is called rndunix and available as an extension module. You
|
||||
should put this in your ~/.gnupg/options file:
|
||||
===8<====================
|
||||
load-extension rndunix
|
||||
===>8====================
|
||||
This collector works by running a lot of tools which yields more or
|
||||
less unpredictable output and fedds this as entropy into the random
|
||||
generator - It should work reliable but you should check whether
|
||||
it produces good output for your kinf of Unix. There are some debug
|
||||
options to help you (see cipher/rndunix.c).
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
|
6
NEWS
6
NEWS
@ -1,3 +1,5 @@
|
||||
Noteworthy changes in version 0.x.x
|
||||
-----------------------------------
|
||||
|
||||
* --export does now only exports rfc2440 compatible keys; the
|
||||
old behavious is available with --export-all.
|
||||
@ -13,8 +15,8 @@
|
||||
|
||||
* New option --escape-from-lines to "dash-escape" "From " lines to
|
||||
prevent mailers to change them to ">From ". This is not enabled by
|
||||
default because it is not in compliace with rfc2440. but you should
|
||||
turn it on.
|
||||
default because it is not in compliance with rfc2440 - however, you
|
||||
should turn it on.
|
||||
|
||||
Noteworthy changes in version 0.4.5
|
||||
-----------------------------------
|
||||
|
17
PROJECTS
17
PROJECTS
@ -9,7 +9,7 @@
|
||||
of the subkey number because two subkeys may have the same keyid.
|
||||
|
||||
* signature verification is done duplicated on import: in import.c and
|
||||
tehn in trustdb.c too. Maybe we can use a flag to skip the actual
|
||||
then in trustdb.c too. Maybe we can use a flag to skip the actual
|
||||
verification process (this should work if we use the same keyblock,
|
||||
but I'm not sure how to accomplish that). Another way is to allow
|
||||
the import of bogus data and let trustdb mark these keys as invalid;
|
||||
@ -17,8 +17,6 @@
|
||||
keyserver by sending him a lot of bogus signatures which he has
|
||||
to check - Needs further investigation.
|
||||
|
||||
* abstraction of the MPI
|
||||
|
||||
* Add a way to override the current cipher/md implementations
|
||||
by others (using extensions)
|
||||
|
||||
@ -34,3 +32,16 @@
|
||||
can do this in trustdb.c:verify_own_keys.
|
||||
(special tool?)
|
||||
|
||||
* rewrite --list-packets or put it into another tool.
|
||||
|
||||
* We need a maintainence pass over the trustdb which flags
|
||||
signatures as expired if the key used to make the signature has
|
||||
expired. Maybe it is a good idea to store the exiration time
|
||||
in the key record of the trustdb.
|
||||
* write a tool to extract selected keys from a file.
|
||||
|
||||
* Change the buffering to a mbuf like scheme? Need it for PSST anyway;
|
||||
see Michael's proposal.
|
||||
|
||||
* Work on the library
|
||||
|
||||
|
392
README
392
README
@ -1,17 +1,17 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
|
||||
GnuPG - The GNU Privacy Guard
|
||||
-------------------------------
|
||||
Version 0.4
|
||||
Version 0.9
|
||||
|
||||
As you can see from the version number, the program may have some
|
||||
bugs and some features may not work at all - please report this to
|
||||
the mailing list.
|
||||
GnuPG is now in Beta test and you should report all bugs to the
|
||||
mailing list (see below). The 0.9.x versions are mainly released
|
||||
to fix all remaining serious bugs. As soon as version 1.0 is out,
|
||||
development will continue with a 1.1 series and bug fixes for the
|
||||
1.0 version are released as needed.
|
||||
|
||||
On a Linux box (version 2.x.x, alpha or x86 CPU) it should
|
||||
work reliably. You may create your key on such a machine and
|
||||
use it. Please verify the tar file; there is a PGP and a GnuPG
|
||||
signature available. My PGP 2 key is well known and published in
|
||||
GnuPG works best on GNU/Linux or *BSD. Other Unices are
|
||||
also supported but not as good tested as those Freenix ones.
|
||||
Please verify the tar file; there is a PGP2 and a GnuPG/PGP5
|
||||
signature available. My PGP2 key is well known and published in
|
||||
the "Global Trust Register for 1998", ISBN 0-9532397-0-5.
|
||||
|
||||
I have included my pubring as "g10/pubring.asc", which contains
|
||||
@ -19,39 +19,37 @@
|
||||
"pub 1024D/57548DCD 1998-07-07 Werner Koch (gnupg sig) <dd9jn@gnu.org>"
|
||||
"Key fingerprint = 6BD9 050F D8FC 941B 4341 2DCC 68B7 AB89 5754 8DCD"
|
||||
|
||||
Old version of gnupg are signed with this key:
|
||||
"pub 1312G/FF3EAA0B 1998-02-09 Werner Koch <wk@isil.d.shuttle.de>"
|
||||
"Key fingerprint = 8489 6CD0 1851 0E33 45DA CD67 036F 11B8 FF3E AA0B"
|
||||
|
||||
My usual key is now:
|
||||
My new DSA key is:
|
||||
"pub 1024D/621CC013 1998-07-07 Werner Koch <werner.koch@guug.de>"
|
||||
"Key fingerprint = ECAF 7590 EB34 43B5 C7CF 3ACB 6C7E E1B8 621C C013"
|
||||
|
||||
You may add it to your GnuPG pubring and use it in the future to
|
||||
You may want add it to your GnuPG pubring and use it in the future to
|
||||
verify new releases. Because you verified this README file and
|
||||
_checked_that_it_is_really_my PGP2 key 0C9857A5, you can be sure
|
||||
that the above fingerprints are correct.
|
||||
|
||||
Please subscribe to g10@net.lut.ac.uk by sending a mail with
|
||||
the word "subscribe" in the body to "g10-request@net.lut.ac.uk".
|
||||
This mailing is closed (only subscribers can post) to avoid spam.
|
||||
This mailing list is a closed one (only subscribers are allowed
|
||||
to post) to avoid misuse by folks who don't know the Netiquette
|
||||
and trash you mailspool with commercial junk.
|
||||
|
||||
See the file COPYING for copyright and warranty information.
|
||||
|
||||
GnuPG is in compliance with RFC2440 (OpenPGP), see doc/OpenPGP for
|
||||
details.
|
||||
|
||||
Due to the fact that GnuPG does not use use any patented algorithm,
|
||||
it cannot be compatible with old PGP versions, because those use
|
||||
it cannot be compatible with PGP2 versions; PGP 2.x does only use
|
||||
IDEA (which is patented worldwide) and RSA (which is patented in
|
||||
the United States until Sep 20, 2000).
|
||||
|
||||
GnuPG is in compliance with RFC2440 (OpenPGP), see doc/OpenPGP for
|
||||
deatils.
|
||||
|
||||
The default algorithms are now DSA and ELGamal. ELGamal for signing
|
||||
The default algorithms are now DSA and ElGamal. ElGamal for signing
|
||||
is still available, but due to the larger size of such signatures it
|
||||
is depreciated (Please note that the GnuPG implementation of ElGamal
|
||||
signatures is *not* insecure). Symmetric algorithms are: 3DES, Blowfish
|
||||
and CAST5, Digest algorithms are MD5, RIPEMD160, SHA1 and TIGER/192.
|
||||
|
||||
signatures is *not* insecure). Symmetric algorithms are: 3DES,
|
||||
Blowfish and CAST5 (Twofish will come soon), available digest
|
||||
algorithms are MD5, RIPEMD160, SHA1 and TIGER/192.
|
||||
|
||||
|
||||
Installation
|
||||
@ -67,27 +65,51 @@
|
||||
|
||||
3) "make install"
|
||||
|
||||
4) You end up with a binary "gpg" in /usr/local/bin
|
||||
4) You end up with the binaries "gpg" and "gpgm" in /usr/local/bin.
|
||||
|
||||
5) Optional, but suggested: install the program "gpg" as suid root.
|
||||
5) Optional, but suggested: install the binary "gpg" as suid root.
|
||||
|
||||
|
||||
|
||||
Key Generation
|
||||
--------------
|
||||
Intro
|
||||
-----
|
||||
This is a brief overview how to use GnuPG - it is highly suggested
|
||||
that you read the manual^H^H^H more information about the use
|
||||
of cryptography. GnuPG is only the technical tool to do it and
|
||||
the security highly depends on that YOU KNOW WHAT YOU ARE DOING.
|
||||
|
||||
If you already have a DSA key from PGP 5 (they call them DH/ElGamal)
|
||||
you can simply copy the pgp keyrings over the GnuPG keyrings after
|
||||
running gpg once, so that it can create the correct directory.
|
||||
|
||||
The normal way to create a key is:
|
||||
|
||||
gpg --gen-key
|
||||
|
||||
This asks some questions and then starts key generation. To create
|
||||
good random numbers for prime number generation, it uses a /dev/random
|
||||
which will only emit bytes if the kernel can gather enough entropy.
|
||||
If you see no progress, you should start some other activities such
|
||||
as mouse moves, "find /" or using the keyboard (in another window).
|
||||
Because we have no hardware device to generate randomness we have to
|
||||
use this method.
|
||||
good random numbers for the key parameters, GnuPG needs to gather
|
||||
enough noise (entropy) from your system. If you see no progress
|
||||
during key generation you should start some other activities such
|
||||
as mouse moves or hitting on the CTRL and SHIFT keys.
|
||||
|
||||
You should make a revocation certificate in case someone gets
|
||||
knowledge of your secret key or you forgot your passphrase:
|
||||
Generate a key ONLY on a machine where you have direct physical
|
||||
access - don't do it over the network or on a machine used also
|
||||
by others - especially if you have no access to the root account.
|
||||
|
||||
When you are asked for a passphrase; use a good one which you can easy
|
||||
remember. Don't make the passphrase too long because you have to
|
||||
type it for every decryption or signing; but - AND THIS IS VERY
|
||||
IMPORTANT - use a good one which is not easily guessable as the
|
||||
security of the whole system relies on your secret key and the
|
||||
passphrase is used to protect this secret key in case someone was
|
||||
able to get access to your secret keyring. A good way to select
|
||||
a passphrase is to figure out a short nonsense sentence which makes
|
||||
some sense for you and modify it by inserting extra spaces, non-letters
|
||||
and changing the case of some characters - this is really easy to
|
||||
remember especially if you associate some pictures with it.
|
||||
|
||||
Then you should create a revocation certificate in case someone
|
||||
gets knowledge of your secret key or you forgot your passphrase:
|
||||
|
||||
gpg --gen-revoke your_user_id
|
||||
|
||||
@ -95,36 +117,7 @@
|
||||
so that you can print it and (hopefully never) re-create it if
|
||||
your electronic media fails.
|
||||
|
||||
If you decided to create a DSA key, you should add an ElGamal
|
||||
for encryption:
|
||||
|
||||
gpg --add-key user_id_of_your_key
|
||||
|
||||
and follow the displayed instructions (select "ElGamal using v4 packets").
|
||||
|
||||
|
||||
You can sign a key with this command:
|
||||
|
||||
gpg --sign-key Donald
|
||||
|
||||
This let you sign the key of "Donald" with your default userid.
|
||||
|
||||
gpg --sign-key -u Karl -u Joe Donald
|
||||
|
||||
This let you sign the key of of "Donald" with the userids of "Karl"
|
||||
and "Joe".
|
||||
All existing signatures are checked; if some are invalid, a menu is
|
||||
offered to delete some of them, and then you are asked for every user
|
||||
whether you want to sign this key.
|
||||
|
||||
You may remove a signature at any time using the option "--edit-sig",
|
||||
which asks for the sigs to remove. Self-signatures are not removable.
|
||||
|
||||
|
||||
|
||||
|
||||
Sign
|
||||
----
|
||||
Now you can use your key to create digital signatures:
|
||||
|
||||
gpg -s file
|
||||
|
||||
@ -133,66 +126,191 @@
|
||||
|
||||
gpg -sa file
|
||||
|
||||
Same as above, but file.gpg is ascii armored.
|
||||
Same as above, but creates the file.asc which is ascii armored and
|
||||
and ready for sending by mail. Note: It is better to use your
|
||||
mailers features to create signatures (The mailer uses GnuPG to do
|
||||
this) because the mailer has the ability to MIME encode such
|
||||
signatures - but this is not a security issue.
|
||||
|
||||
gpg -s -o out file
|
||||
|
||||
Creates a signature of file, but writes the output to the file "out".
|
||||
|
||||
If you use the option "--rfc1991", gnupg tries to me more compatible
|
||||
to RFC1991 (pgp 2.x).
|
||||
Everyone who knows your public key (you can and should publish
|
||||
your key by putting it on a key server, a web page or in your .plan
|
||||
file) is now able to check whether you really signed this text;
|
||||
|
||||
gpg --verify file
|
||||
|
||||
Encrypt
|
||||
-------
|
||||
GnuPG now checks whether the signature is valid and prints an
|
||||
appropriate message. If the signature is good, you know at least
|
||||
that the person (or machine) has access to the secret key which
|
||||
corresponds to the published public key.
|
||||
If you run gpg without an option it will verify the signature and
|
||||
create a new file which is identical to the original file. gpg
|
||||
can also run as a filter, so that you can pipe data to verify
|
||||
trough it:
|
||||
|
||||
cat signed-file | gpg | wc -l
|
||||
|
||||
will check the signature of signed-file and then display the
|
||||
number of lines in the original file.
|
||||
|
||||
To send a message encrypted to someone you can use this:
|
||||
|
||||
gpg -e -r heine file
|
||||
|
||||
This encrypts files with the public key of "heine" and writes it
|
||||
to "file.gpg"
|
||||
This encrypts file with the public key of the user "heine" and
|
||||
writes it to "file.gpg"
|
||||
|
||||
echo "hallo" | gpg -ea -r heine | mail heine
|
||||
|
||||
Ditto, but encrypts "hallo\n" and mails it as ascii armored message.
|
||||
|
||||
|
||||
Sign and Encrypt
|
||||
----------------
|
||||
Ditto, but encrypts "hallo\n" and mails it as ascii armored message
|
||||
to the user with the mail address heine.
|
||||
|
||||
gpg -se -r heine file
|
||||
|
||||
This encrypts files with the public key of "heine" and writes it
|
||||
to "file.gpg" after signing it with the default user id.
|
||||
|
||||
This encrypts file with the public key of "heine" and writes it
|
||||
to "file.gpg" after signing it with your user id.
|
||||
|
||||
gpg -se -r heine -u Suttner file
|
||||
|
||||
Ditto, but sign the file with the user id "Suttner"
|
||||
Ditto, but sign the file with your alternative user id "Suttner"
|
||||
|
||||
|
||||
Keyring Management
|
||||
------------------
|
||||
To export your complete keyring(s) do this:
|
||||
GnuPG has some options to help you publish public keys; this is
|
||||
called "exporting" a key:
|
||||
|
||||
gpg --export
|
||||
gpg --export >all-my-keys
|
||||
|
||||
To export only some user ids do this:
|
||||
exports all the keys in the keyring and writes them (in a binary format)
|
||||
to all-my-keys. You may then mail "all-my-keys" as an MIME attachment
|
||||
to someone else or put it on an FTP server. To export only some
|
||||
user IDs, you give them as arguments on the command line.
|
||||
|
||||
gpg --export userids
|
||||
To mail a public key or put it on a web page you have to create
|
||||
the key in ASCII armored format:
|
||||
|
||||
Use "-a" or "--armor" to create ASCII armored output.
|
||||
gpg --export --armor | mail panther@tiger.int
|
||||
|
||||
Importing keys is done with the option, you guessed it, "--import":
|
||||
This will send all your public keys to your friend panther.
|
||||
|
||||
If you have received a key from someone else you can put it
|
||||
into your public keyring; is called "importing":
|
||||
|
||||
gpg --import [filenames]
|
||||
|
||||
New keys are appended to the default keyring and already existing
|
||||
keys are merged. Keys without a self-signature are ignored.
|
||||
New keys are appended to your keyring and already existing
|
||||
keys are updated. Note that GnuPG does not allow keys which
|
||||
are not self-signed by the user.
|
||||
|
||||
Because anyone can claim that the public key belongs to her
|
||||
we must have some way to check that the public key really belongs
|
||||
to the owner. This can be achieved by comparing the key during
|
||||
a phone call. Sure, it is not very easy to compare a binary file
|
||||
by reading the complete hex dump of the file - GnuPG (and nearly
|
||||
every other program used for management of cryptographic keys)
|
||||
provides other solutions:
|
||||
|
||||
gpg --fingerprint <username>
|
||||
|
||||
prints the so called "fingerprint" of the given username; this
|
||||
is a sequence of hex bytes (which you may have noticed in mail
|
||||
sigs or on business cards) which uniquely identify the public
|
||||
key - two different keys will always have different fingerprints.
|
||||
It is easy to compare this fingerprint by phone and I suggest
|
||||
that you print your fingerprint on the back of your business
|
||||
card.
|
||||
|
||||
If you don't know the owner of the public key you are in trouble;
|
||||
but wait: A friend of you knows someone who knows someone who
|
||||
has met the owner of the public key at some computer conference.
|
||||
So all the persons between you and the public key holder may now
|
||||
act as introducer to you; this is done by signing the keys and
|
||||
thereby certifying the other keys. If you then trust all the
|
||||
introducers to correctly sign other keys, you can be be sure that
|
||||
the other key really belongs to the one who claims so.
|
||||
|
||||
There are 2 steps to validate a target key:
|
||||
1. First check that there is a complete chain
|
||||
of signed keys from the public key you want to use
|
||||
and your key and verify each signature.
|
||||
2. Make sure that you have full trust in the certificates
|
||||
of all the introduces between the public key holder and
|
||||
you.
|
||||
Step 2 is the more complicated part because there is no easy way
|
||||
for a computer to decide who is trustworthy and who is not. GnuPG
|
||||
leaves this decision to you and will ask you for a trust value
|
||||
(here also referenced as the owner-trust of a key) for every key
|
||||
needed to check the chain of certificates. You may choose from:
|
||||
a) "I don't know" - then it is not possible to use any
|
||||
of the chains of certificates, in which this key is used
|
||||
as an introducer, to validate the target key. Use this if
|
||||
you don't know the introducer.
|
||||
b) "I do not trust" - Use this if you know that the introducer
|
||||
does not do a good job in certifying other keys. The effect
|
||||
is the same as with a) but for a) you may later want to
|
||||
change the value because you got new information about this
|
||||
introducer.
|
||||
c) "I trust marginally" - Use this if you assume that the
|
||||
introducer knows what he is doing. Together with some
|
||||
other marginally trusted keys, GnuPG validates the target
|
||||
key then as good.
|
||||
d) "I fully trust" - Use this if you really know that this
|
||||
introducer does a good job when certifying other keys.
|
||||
If all the introducer are of this trust value, GnuPG
|
||||
normally needs only one chain of signatures to validate
|
||||
a target key okay. (But this may be adjusted with the help
|
||||
of some options).
|
||||
These information are confidential because they give your
|
||||
personal opinion on the trustworthy of someone else. Therefore
|
||||
this data is not stored in the keyring but in the "trustdb"
|
||||
(~/.gnupg/trustdb.gpg). Do not assign a high trust value just
|
||||
because the introducer is a friend of you - decide how far she
|
||||
understands all the implications of key signatures and you may
|
||||
want to tell him more about public key cryptography so you
|
||||
can later change the trust value you assigned.
|
||||
|
||||
Okay, here is how GnuPG helps you in key management: Most stuff is
|
||||
done with the --edit-key command:
|
||||
|
||||
gpg --edit-key <keyid or username>
|
||||
|
||||
GnuPG displays some information about the key and then prompts
|
||||
for a command (enter "help" to see a list of commands and see
|
||||
the man page for a more detailed explanation). To sign a key
|
||||
you select the user ID you want to sign by entering the number
|
||||
which is displayed in the leftmost column (or do nothing if the
|
||||
key has only one user ID) and then enter the command "sign" and
|
||||
follow all the prompts. When you are ready, give the command
|
||||
"save" (or use "quit" to cancel your actions).
|
||||
|
||||
If you want to sign the key with another user ID of yours, you
|
||||
must give an "-u" option on the command line together with the
|
||||
"--edit-key".
|
||||
|
||||
Normally you want to sign only one user ID because GnuPG
|
||||
does only use one and this keeps the public key certificate
|
||||
small. Because such key signatures are very important you
|
||||
should make sure that the signators of your key sign a user ID
|
||||
which is very likely to stay for a long time - choose one with an
|
||||
email address you have full control of or do not enter an email
|
||||
address at all. In future GnuPG will have a way to tell which
|
||||
user ID is the one with an email address you prefer - because
|
||||
you have no signatures on this email address it is easy to change
|
||||
this address. Remember: Your signators sign your public key (the
|
||||
primary one) together with one od your user IDs - so it is not possible
|
||||
to change the user ID later without voiding all the signatures.
|
||||
|
||||
Tip: If you hear about a key signing party on a computer conference
|
||||
join it because this is a very convenient way to get your key
|
||||
certified (But remember that signatures have nothing to to with the
|
||||
trust you assign to a key).
|
||||
|
||||
|
||||
How to Specify a UserID
|
||||
-----------------------
|
||||
There are several ways to specify a userID, here are some examples:
|
||||
7 Ways to Specify a User ID
|
||||
--------------------------
|
||||
There are several ways to specify a user ID, here are some examples:
|
||||
|
||||
* Only by the short keyid (prepend a zero if it begins with A..F):
|
||||
|
||||
@ -216,7 +334,7 @@
|
||||
|
||||
The first one is MD5 the others are ripemd160 or sha1.
|
||||
|
||||
* By an exact string (not yet implemented):
|
||||
* By an exact string:
|
||||
|
||||
"=Heinrich Heine <heinrichh@uni-duesseldorf.de>"
|
||||
|
||||
@ -224,17 +342,13 @@
|
||||
|
||||
"<heinrichh@uni-duesseldorf.de>"
|
||||
|
||||
This can be used by a keyserver instead of a substring to
|
||||
find this key faster.
|
||||
|
||||
* By the Local ID (from the trustdb):
|
||||
* By the Local ID (from the trust DB):
|
||||
|
||||
"#34"
|
||||
|
||||
This can be used by a MUA to specify an exact key after selecting
|
||||
This may be used by a MUA to specify an exact key after selecting
|
||||
a key from GnuPG (by the use of a special option or an extra utility)
|
||||
|
||||
|
||||
* Or by the usual substring:
|
||||
|
||||
"Heine"
|
||||
@ -243,14 +357,12 @@
|
||||
The '*' indicates substring search explicitly.
|
||||
|
||||
|
||||
|
||||
|
||||
Batch mode
|
||||
----------
|
||||
If you use the option "--batch", GnuPG runs in non-interactive mode and
|
||||
never prompts for input data. This does not even allow entering the
|
||||
passphrase; until we have a better solution (something like ssh-agent),
|
||||
you can use the option "--passhrase-fd n", which works like PGPs
|
||||
you can use the option "--passphrase-fd n", which works like PGPs
|
||||
PGPPASSFD.
|
||||
|
||||
Batch mode also causes GnuPG to terminate as soon as a BAD signature is
|
||||
@ -261,8 +373,8 @@
|
||||
-----------
|
||||
GnuPG returns with an exit status of 1 if in batch mode and a bad signature
|
||||
has been detected or 2 or higher for all other errors. You should parse
|
||||
stderr or the output of the fd specified with --status-fd to get detailed
|
||||
information about the errors.
|
||||
stderr or better the output of the fd specified with --status-fd to get
|
||||
detailed information about the errors.
|
||||
|
||||
|
||||
Esoteric commands
|
||||
@ -272,73 +384,41 @@
|
||||
|
||||
Use this to list the contents of a data file. If the file is encrypted
|
||||
you are asked for the passphrase, so that GnuPG is able to look at the
|
||||
inner structure of a encrypted packet.
|
||||
inner structure of a encrypted packet. This command should be able
|
||||
to list all kinds of rfc2440 messages.
|
||||
|
||||
gpgm --list-trustdb
|
||||
|
||||
List the contents of the trustdb in a human readable format
|
||||
List the contents of the trust DB in a human readable format
|
||||
|
||||
gpgm --list-trustdb <usernames>
|
||||
|
||||
List the tree of certificates for the given usernames
|
||||
|
||||
gpgm --list-trust-path depth username
|
||||
gpgm --list-trust-path username
|
||||
|
||||
List the possible trust paths for the given username, up to the specified
|
||||
depth. If depth is negative, duplicate introducers are not listed,
|
||||
because those would increase the trust probability only minimally.
|
||||
(you must use the special option "--" to stop option parsing when
|
||||
using a negative number). This option may create new entries in the
|
||||
trustdb.
|
||||
List the possible trust paths for the given username. The length
|
||||
of such a trust path is limited by the option --max-cert-depth
|
||||
which defaults to 5.
|
||||
|
||||
gpgm --print-mds filenames
|
||||
|
||||
List all available message digest values for the fiven filenames
|
||||
|
||||
For more options/commands see the file g10/OPTIONS, or use "gpg --help"
|
||||
|
||||
|
||||
Debug Flags
|
||||
-----------
|
||||
Use the option "--debug n" to output debug information. This option
|
||||
can be used multiple times, all values are ORed; n maybe prefixed with
|
||||
0x to use hex-values.
|
||||
|
||||
value used for
|
||||
----- ----------------------------------------------
|
||||
1 packet reading/writing
|
||||
2 MPI details
|
||||
4 ciphers and primes (may reveal sensitive data)
|
||||
8 iobuf filter functions
|
||||
16 iobuf stuff
|
||||
32 memory allocation stuff
|
||||
64 caching
|
||||
128 show memory statistics at exit
|
||||
256 trust verification stuff
|
||||
For more options/commands see the man page or use "gpg --help".
|
||||
|
||||
|
||||
Other Notes
|
||||
-----------
|
||||
This is work in progress, so you may find duplicated code fragments,
|
||||
ugly data structures, weird usage of filenames and other things.
|
||||
|
||||
The primary FTP site is "ftp://ftp.gnupg.org/pub/gcrypt/"
|
||||
The primary WWW page is "http://www.gnupg.org"
|
||||
|
||||
If you like, send your keys to <gnupg-keys@isil.d.shuttle.de>; use
|
||||
"gpg --export --armor | mail gnupg-keys@isil.d.shuttle.de" to do this.
|
||||
See http://www.gnugp.org/mirrors.html for a list of FTP mirrors
|
||||
and use them if possible.
|
||||
|
||||
Please direct bug reports to <gnupg-bugs@gnu.org> or better
|
||||
post them to the mailing list <g10@net.lut.ac.uk> (this is a closed list,
|
||||
please subscribe before posting, see above (~line 33)).
|
||||
post them to the mailing list <g10@net.lut.ac.uk> (this is a
|
||||
closed list - subscribe before posting, see above (~line 33)).
|
||||
Please direct questions about GnuPG to the mailing list or
|
||||
one of the pgp newsgroups; this gives me more time to improve
|
||||
GnuPG. Commercial support for GnuPG will be availabe soon.
|
||||
|
||||
Have fun and remember: Echelon is looking at you kid.
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v0.4.4 (GNU/Linux)
|
||||
Comment: For info finger gcrypt@ftp.guug.de
|
||||
|
||||
iQB1AwUBNlXAUh0Z9MEMmFelAQFmhwL/RfW9WxAMTh/edDy0yGTJjDgo7d/Kfmtq
|
||||
8C0LJ4b2M0py1ctW6jZyiQsYtvkrttKiTYXGtRoIzVFWX2hqABKPCTHzOeXQEOSu
|
||||
ro5fnRwsuj9cRxhH8lpN+diY+m1E5Fu3
|
||||
=sciv
|
||||
-----END PGP SIGNATURE-----
|
||||
|
53
TODO
53
TODO
@ -1,49 +1,48 @@
|
||||
Bugs
|
||||
----
|
||||
* clearsig: keep lineendings as they are. Remember that trailings
|
||||
blanks are not hashed. Funny: pgp263in works fine even with
|
||||
a source file with CR,LF but GnuPG and pgp263in has problems
|
||||
if the clearsign has been created by pgp263ia.
|
||||
Needs more investigation - anyone?
|
||||
|
||||
Important
|
||||
----------
|
||||
* Check revocation and expire stuff. PLEASE: THIS MUST BE TESTED!
|
||||
|
||||
* Escape "From "
|
||||
|
||||
* Check calculation of key validity. PLEASE: IT IS IMPORTED THAT
|
||||
THIS GET TESTED.
|
||||
|
||||
* preferences of hash algorithms are not yet used.
|
||||
* It has been reported that lockfiles are not removed in all cases.
|
||||
cleanup is done with atexit() and all signals trigger exit() -
|
||||
anything wrong with this?
|
||||
|
||||
* I noticed, that we sometimes have only 3 items in a trustrecord, but
|
||||
a next pointer ro more records - check wehther the reuse code really
|
||||
works. Maybe this is the reason for the "Hmmm public key lost"
|
||||
|
||||
* clearsig: keep lineendings as they are. Remember that trailings
|
||||
blanks are not hashed.
|
||||
Needed
|
||||
------
|
||||
* remove more "Fixmes"
|
||||
|
||||
* should we flush the getkey.c caches while doing an import?
|
||||
|
||||
* We need a maintainence pass over the trustdb which flags
|
||||
signatures as expired if the key used to make the signature has
|
||||
expired. Maybe it is a good idea to store the exiration time
|
||||
in the key record of the trustdb.
|
||||
|
||||
* write a tool to extract selected keys from a file.
|
||||
* Replace Blowfish by Twofish and add the new encrypted packet typ
|
||||
which has a MACing option (append SHA1 hash to the plaintext and
|
||||
encrypt this all) - We need an identifier for Twofish to put this
|
||||
one into the cipher preferences.
|
||||
|
||||
Nice to have
|
||||
------------
|
||||
* preferences of hash algorithms are not yet used.
|
||||
* new menu to delete signatures and list signature in menu
|
||||
|
||||
* Replace the SIGUSR1 stuff by semaphores to avoid loss of a signal.
|
||||
or use POSIX.4 realtime signals.
|
||||
|
||||
* add test cases for invalid data (scrambled armor or other random data)
|
||||
|
||||
* rewrite --list-packets or put it into another tool.
|
||||
|
||||
* add checking of armor trailers
|
||||
* Burn the buffers used by fopen(), or use read(2). Does this
|
||||
really make sense?
|
||||
|
||||
* Change the buffering to a mbuf like scheme? Need it for PSST anyway;
|
||||
see Michael's proposal.
|
||||
* add checking of armor trailers
|
||||
* remove all "Fixmes" ;-)
|
||||
|
||||
* change the fake_data stuff to mpi_set_opaque
|
||||
|
||||
* Replace Blowfish by Twofish
|
||||
|
||||
* Work on the library
|
||||
Minor Bugs
|
||||
----------
|
||||
* md_start_debug used to crash at pgm termination.
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
* Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
|
||||
* ISBN 0-471-11709-9. Pages 336 ff.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* blowfish.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* cast5.c - CAST5 cipher (RFC2144)
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* cast5.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* cipher.c - cipher dispatcher
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -8,14 +8,14 @@
|
||||
* Bruce Schneier: Applied Cryptography. Second Edition.
|
||||
* John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* des.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* dsa.c - DSA signature scheme
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* dsa.h - DSA signature scheme
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* dynload.c - load cipher extensions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* dynload.5
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -5,14 +5,14 @@
|
||||
* Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
|
||||
* ISBN 0-471-11709-9. Pages 476 ff.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* elgamal.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* g10c.c - Wrapper for cipher functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -5,14 +5,14 @@
|
||||
* Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
|
||||
* ISBN 0-471-11709-9. .
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* gost.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* md.c - message digest dispatcher
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
|
||||
/* modified for GNUPG by <werner.koch@guug.de> */
|
||||
/* modified for GnuPG by <werner.koch@guug.de> */
|
||||
|
||||
/* Test values:
|
||||
* "" D4 1D 8C D9 8F 00 B2 04 E9 80 09 98 EC F8 42 7E
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* md5.h - message digest 5
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* primegen.c - prime number generator
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* pubkey.c - pubkey dispatcher
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* rand-internal.h - header to glue the random functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* random.c - random number generator
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* random.h - random functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* rmd.h - RIPE-MD hash functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* rmd160.c - RIPE-MD160
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* rmd160test.c - ripe md 160 test program
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -3,14 +3,14 @@
|
||||
*
|
||||
* Please see below for more legal information!
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* sha1.h - SHA1 hash function
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* smallprime.c - List of small primes
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* tiger.c - The TIGER hash function
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
38
doc/HACKING
38
doc/HACKING
@ -55,6 +55,44 @@ RFCs
|
||||
|
||||
|
||||
|
||||
Debug Flags
|
||||
-----------
|
||||
Use the option "--debug n" to output debug information. This option
|
||||
can be used multiple times, all values are ORed; n maybe prefixed with
|
||||
0x to use hex-values.
|
||||
|
||||
value used for
|
||||
----- ----------------------------------------------
|
||||
1 packet reading/writing
|
||||
2 MPI details
|
||||
4 ciphers and primes (may reveal sensitive data)
|
||||
8 iobuf filter functions
|
||||
16 iobuf stuff
|
||||
32 memory allocation stuff
|
||||
64 caching
|
||||
128 show memory statistics at exit
|
||||
256 trust verification stuff
|
||||
|
||||
|
||||
|
||||
|
||||
Directory Layout
|
||||
----------------
|
||||
./ Readme, configure
|
||||
./scripts Scripts needed by configure and others
|
||||
./doc Documentaion
|
||||
./util General purpose utility function
|
||||
./mpi Multi precision integer library
|
||||
./cipher Cryptographic functions
|
||||
./g10 GnuPG application
|
||||
./tools Some helper and demo programs
|
||||
./keybox The keybox library
|
||||
./gcrypt Stuff needed to build libgcrypt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Memory allocation
|
||||
-----------------
|
||||
Use only the functions:
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Dec 23 13:18:14 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* pkclist.c (add_ownertrust): Refresh validity values.
|
||||
|
||||
* trustdb.c (enum_cert_paths_print): New arg refresh.
|
||||
|
||||
* ringedit.c: Fixed problems fix keyrings
|
||||
* parse-packet.c (dbg_parse_packet): New debug functions.
|
||||
|
||||
* getkey.c (getkey_disable_caches): New.
|
||||
* import.c (import_keys): Disable caches.
|
||||
|
||||
Thu Dec 17 18:31:15 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* misc.c (trap_unaligned): Only for glibc 1
|
||||
|
@ -1179,7 +1179,7 @@ armor_filter( void *opaque, int control,
|
||||
iobuf_writestr(a, "-----\n");
|
||||
}
|
||||
else if( !afx->any_data && !afx->inp_bypass )
|
||||
log_error(_("no valid RFC1991 or OpenPGP data found.\n"));
|
||||
log_error(_("no valid OpenPGP data found.\n"));
|
||||
}
|
||||
else if( control == IOBUFCTRL_DESC )
|
||||
*(char**)buf = "armor_filter";
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* build-packet.c - assemble packets and write them
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* cipher.c - En-/De-ciphering filter
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* comment.c - write comment stuff
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* compress.c - compress filter
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* dearmor.c - Armor utility
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* verify.c - verify signed data
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* delkey.c - delete keys
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* encode.c - encode data
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* encr-data.c - process an encrypted data packet
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* export.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* filter.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* free-packet.c - cleanup stuff for packets
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* g10.c - The GnuPG utility (main for gpg)
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
42
g10/getkey.c
42
g10/getkey.c
@ -1,14 +1,14 @@
|
||||
/* getkey.c - Get a key from the database
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -160,7 +160,7 @@ cache_public_key( PKT_public_key *pk )
|
||||
if( pk_cache_entries >= MAX_PK_CACHE_ENTRIES ) {
|
||||
/* fixme: use another algorithm to free some cache slots */
|
||||
pk_cache_disabled=1;
|
||||
if( opt.verbose )
|
||||
if( opt.verbose > 1 )
|
||||
log_info(_("too many entries in pk cache - disabled\n"));
|
||||
return;
|
||||
}
|
||||
@ -208,6 +208,38 @@ cache_user_id( PKT_user_id *uid, u32 *keyid )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
getkey_disable_caches()
|
||||
{
|
||||
#if MAX_UNK_CACHE_ENTRIES
|
||||
{
|
||||
keyid_list_t kl, kl2;
|
||||
for( kl = unknown_keyids; kl; kl = kl2 ) {
|
||||
kl2 = kl->next;
|
||||
m_free(kl);
|
||||
}
|
||||
unknown_keyids = NULL;
|
||||
unk_cache_disabled = 1;
|
||||
}
|
||||
#endif
|
||||
#if MAX_PK_CACHE_ENTRIES
|
||||
{
|
||||
pk_cache_entry_t ce, ce2;
|
||||
u32 keyid[2];
|
||||
|
||||
for( ce = pk_cache; ce; ce = ce2 ) {
|
||||
ce2 = ce->next;
|
||||
free_public_key( ce->pk );
|
||||
m_free( ce );
|
||||
}
|
||||
pk_cache_disabled=1;
|
||||
pk_cache_entries = 0;
|
||||
pk_cache = NULL;
|
||||
}
|
||||
#endif
|
||||
/* fixme: disable user id cache ? */
|
||||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Get a public key and store it into the allocated pk
|
||||
@ -259,7 +291,7 @@ get_pubkey( PKT_public_key *pk, u32 *keyid )
|
||||
;
|
||||
else if( ++unk_cache_entries > MAX_UNK_CACHE_ENTRIES ) {
|
||||
unk_cache_disabled = 1;
|
||||
if( opt.verbose )
|
||||
if( opt.verbose > 1 )
|
||||
log_info(_("too many entries in unk cache - disabled\n"));
|
||||
}
|
||||
else {
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* ggpd.c - The GNUPG daemon (keyserver)
|
||||
/* ggpd.c - The GnuPG daemon (keyserver)
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -130,6 +130,9 @@ import_keys( const char *fname, int fast )
|
||||
return G10ERR_OPEN_FILE;
|
||||
}
|
||||
|
||||
|
||||
getkey_disable_caches();
|
||||
|
||||
if( !opt.no_armor ) /* armored reading is not disabled */
|
||||
iobuf_push_filter( inp, armor_filter, &afx );
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* kbnode.c - keyblock node utility functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* keydb.h - Key database
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -77,6 +77,7 @@ struct keyblock_pos_struct {
|
||||
byte keybuf[21];
|
||||
#endif
|
||||
PACKET *pkt; /* ditto */
|
||||
int valid;
|
||||
};
|
||||
typedef struct keyblock_pos_struct KBPOS;
|
||||
|
||||
@ -130,6 +131,7 @@ char *get_last_passphrase(void);
|
||||
/*-- getkey.c --*/
|
||||
int classify_user_id( const char *name, u32 *keyid, byte *fprint,
|
||||
const char **retstr, size_t *retlen );
|
||||
void getkey_disable_caches(void);
|
||||
int get_pubkey( PKT_public_key *pk, u32 *keyid );
|
||||
int get_pubkey_byname( GETKEY_CTX *rx, PKT_public_key *pk,
|
||||
const char *name, KBNODE *ret_keyblock );
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* keyedit.c - keyedit stuff
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* keygen.c - generate a key pair
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* keyid.c - jeyid and fingerprint handling
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* keylist.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* ks-proto.c keyserver protocol handling
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* ks-proto.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* main.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* mainproc.c - handle packets
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* mdfilter.c - filter data and calculate a message digest
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* misc.c - miscellaneous functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* openfile.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* options.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -33,7 +33,7 @@ force-v3-sigs
|
||||
# cleartext signatures; all other PGP versions it this way too.
|
||||
# To enable full OpenPGP compliance you have to remove this option.
|
||||
|
||||
escape_from_lines
|
||||
escape-from-lines
|
||||
|
||||
# If you do not use the Latin-1 (ISO-8859-1) charset, you should
|
||||
# tell GnuPG which is the native character set. Please check
|
||||
|
23
g10/packet.h
23
g10/packet.h
@ -1,14 +1,14 @@
|
||||
/* packet.h - packet read/write stuff
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -27,6 +27,8 @@
|
||||
#include "cipher.h"
|
||||
#include "filter.h"
|
||||
|
||||
#define DEBUG_PARSE_PACKET 1
|
||||
|
||||
typedef enum {
|
||||
PKT_NONE =0,
|
||||
PKT_PUBKEY_ENC =1, /* public key encrypted packet */
|
||||
@ -236,11 +238,26 @@ int list_packets( IOBUF a );
|
||||
|
||||
/*-- parse-packet.c --*/
|
||||
int set_packet_list_mode( int mode );
|
||||
|
||||
#if DEBUG_PARSE_PACKET
|
||||
int dbg_search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos, const char* file, int lineno );
|
||||
int dbg_parse_packet( IOBUF inp, PACKET *ret_pkt, const char* file, int lineno );
|
||||
int dbg_copy_all_packets( IOBUF inp, IOBUF out, const char* file, int lineno );
|
||||
int dbg_copy_some_packets( IOBUF inp, IOBUF out, ulong stopoff, const char* file, int lineno );
|
||||
int dbg_skip_some_packets( IOBUF inp, unsigned n, const char* file, int lineno );
|
||||
#define search_packet( a,b,c,d ) dbg_search_packet( (a), (b), (c), (d), __FILE__, __LINE__ )
|
||||
#define parse_packet( a, b ) dbg_parse_packet( (a), (b), __FILE__, __LINE__ )
|
||||
#define copy_all_packets( a,b ) dbg_copy_all_packets((a),(b), __FILE__, __LINE__ )
|
||||
#define copy_some_packets( a,b,c ) dbg_copy_some_packets((a),(b),(c), __FILE__, __LINE__ )
|
||||
#define skip_some_packets( a,b ) dbg_skip_some_packets((a),(b), __FILE__, __LINE__ )
|
||||
#else
|
||||
int search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos );
|
||||
int parse_packet( IOBUF inp, PACKET *ret_pkt);
|
||||
int copy_all_packets( IOBUF inp, IOBUF out );
|
||||
int copy_some_packets( IOBUF inp, IOBUF out, ulong stopoff );
|
||||
int skip_some_packets( IOBUF inp, unsigned n );
|
||||
#endif
|
||||
|
||||
const byte *parse_sig_subpkt( const byte *buffer,
|
||||
sigsubpkttype_t reqtype, size_t *ret_n );
|
||||
const byte *parse_sig_subpkt2( PKT_signature *sig,
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* parse-packet.c - read packets
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -39,7 +39,11 @@ static int mpi_print_mode = 0;
|
||||
static int list_mode = 0;
|
||||
|
||||
static int parse( IOBUF inp, PACKET *pkt, int reqtype,
|
||||
ulong *retpos, int *skip, IOBUF out, int do_skip );
|
||||
ulong *retpos, int *skip, IOBUF out, int do_skip
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
,const char *dbg_w, const char *dbg_f, int dbg_l
|
||||
#endif
|
||||
);
|
||||
static int copy_packet( IOBUF inp, IOBUF out, int pkttype,
|
||||
unsigned long pktlen );
|
||||
static void skip_packet( IOBUF inp, int pkttype, unsigned long pktlen );
|
||||
@ -119,6 +123,18 @@ unknown_pubkey_warning( int algo )
|
||||
* Note: The function may return an error and a partly valid packet;
|
||||
* caller must free this packet.
|
||||
*/
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
int
|
||||
dbg_parse_packet( IOBUF inp, PACKET *pkt, const char *dbg_f, int dbg_l )
|
||||
{
|
||||
int skip, rc;
|
||||
|
||||
do {
|
||||
rc = parse( inp, pkt, 0, NULL, &skip, NULL, 0, "parse", dbg_f, dbg_l );
|
||||
} while( skip );
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
int
|
||||
parse_packet( IOBUF inp, PACKET *pkt )
|
||||
{
|
||||
@ -129,10 +145,24 @@ parse_packet( IOBUF inp, PACKET *pkt )
|
||||
} while( skip );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Like parse packet, but only return packets of the given type.
|
||||
*/
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
int
|
||||
dbg_search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos,
|
||||
const char *dbg_f, int dbg_l )
|
||||
{
|
||||
int skip, rc;
|
||||
|
||||
do {
|
||||
rc = parse( inp, pkt, pkttype, retpos, &skip, NULL, 0, "search", dbg_f, dbg_l );
|
||||
} while( skip );
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
int
|
||||
search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos )
|
||||
{
|
||||
@ -143,10 +173,24 @@ search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos )
|
||||
} while( skip );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Copy all packets from INP to OUT, thereby removing unused spaces.
|
||||
*/
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
int
|
||||
dbg_copy_all_packets( IOBUF inp, IOBUF out,
|
||||
const char *dbg_f, int dbg_l )
|
||||
{
|
||||
PACKET pkt;
|
||||
int skip, rc=0;
|
||||
do {
|
||||
init_packet(&pkt);
|
||||
} while( !(rc = parse( inp, &pkt, 0, NULL, &skip, out, 0, "copy", dbg_f, dbg_l )));
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
int
|
||||
copy_all_packets( IOBUF inp, IOBUF out )
|
||||
{
|
||||
@ -157,11 +201,28 @@ copy_all_packets( IOBUF inp, IOBUF out )
|
||||
} while( !(rc = parse( inp, &pkt, 0, NULL, &skip, out, 0 )));
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Copy some packets from INP to OUT, thereby removing unused spaces.
|
||||
* Stop at offset STOPoff (i.e. don't copy packets at this or later offsets)
|
||||
*/
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
int
|
||||
dbg_copy_some_packets( IOBUF inp, IOBUF out, ulong stopoff,
|
||||
const char *dbg_f, int dbg_l )
|
||||
{
|
||||
PACKET pkt;
|
||||
int skip, rc=0;
|
||||
do {
|
||||
if( iobuf_tell(inp) >= stopoff )
|
||||
return 0;
|
||||
init_packet(&pkt);
|
||||
} while( !(rc = parse( inp, &pkt, 0, NULL, &skip, out, 0,
|
||||
"some", dbg_f, dbg_l )) );
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
int
|
||||
copy_some_packets( IOBUF inp, IOBUF out, ulong stopoff )
|
||||
{
|
||||
@ -174,10 +235,26 @@ copy_some_packets( IOBUF inp, IOBUF out, ulong stopoff )
|
||||
} while( !(rc = parse( inp, &pkt, 0, NULL, &skip, out, 0 )) );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Skip over N packets
|
||||
*/
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
int
|
||||
dbg_skip_some_packets( IOBUF inp, unsigned n,
|
||||
const char *dbg_f, int dbg_l )
|
||||
{
|
||||
int skip, rc=0;
|
||||
PACKET pkt;
|
||||
|
||||
for( ;n && !rc; n--) {
|
||||
init_packet(&pkt);
|
||||
rc = parse( inp, &pkt, 0, NULL, &skip, NULL, 1, "skip", dbg_f, dbg_l );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
int
|
||||
skip_some_packets( IOBUF inp, unsigned n )
|
||||
{
|
||||
@ -190,7 +267,7 @@ skip_some_packets( IOBUF inp, unsigned n )
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/****************
|
||||
@ -202,7 +279,11 @@ skip_some_packets( IOBUF inp, unsigned n )
|
||||
*/
|
||||
static int
|
||||
parse( IOBUF inp, PACKET *pkt, int reqtype, ulong *retpos,
|
||||
int *skip, IOBUF out, int do_skip )
|
||||
int *skip, IOBUF out, int do_skip
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
,const char *dbg_w, const char *dbg_f, int dbg_l
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int rc=0, c, ctb, pkttype, lenbytes;
|
||||
unsigned long pktlen;
|
||||
@ -214,6 +295,7 @@ parse( IOBUF inp, PACKET *pkt, int reqtype, ulong *retpos,
|
||||
assert( !pkt->pkt.generic );
|
||||
if( retpos )
|
||||
*retpos = iobuf_tell(inp);
|
||||
|
||||
if( (ctb = iobuf_get(inp)) == -1 ) {
|
||||
rc = -1;
|
||||
goto leave;
|
||||
@ -221,7 +303,8 @@ parse( IOBUF inp, PACKET *pkt, int reqtype, ulong *retpos,
|
||||
hdrlen=0;
|
||||
hdr[hdrlen++] = ctb;
|
||||
if( !(ctb & 0x80) ) {
|
||||
log_error("%s: invalid packet (ctb=%02x)\n", iobuf_where(inp), ctb );
|
||||
log_error("%s: invalid packet (ctb=%02x) near %lu\n",
|
||||
iobuf_where(inp), ctb, iobuf_tell(inp) );
|
||||
rc = G10ERR_INVALID_PACKET;
|
||||
goto leave;
|
||||
}
|
||||
@ -294,9 +377,16 @@ parse( IOBUF inp, PACKET *pkt, int reqtype, ulong *retpos,
|
||||
goto leave;
|
||||
}
|
||||
|
||||
if( DBG_PACKET )
|
||||
if( DBG_PACKET ) {
|
||||
#ifdef DEBUG_PARSE_PACKET
|
||||
log_debug("parse_packet(iob=%d): type=%d length=%lu%s (%s.%s.%d)\n",
|
||||
iobuf_id(inp), pkttype, pktlen, new_ctb?" (new_ctb)":"",
|
||||
dbg_w, dbg_f, dbg_l );
|
||||
#else
|
||||
log_debug("parse_packet(iob=%d): type=%d length=%lu%s\n",
|
||||
iobuf_id(inp), pkttype, pktlen, new_ctb?" (new_ctb)":"" );
|
||||
#endif
|
||||
}
|
||||
pkt->pkttype = pkttype;
|
||||
rc = G10ERR_UNKNOWN_PACKET; /* default error */
|
||||
switch( pkttype ) {
|
||||
@ -384,6 +474,7 @@ copy_packet( IOBUF inp, IOBUF out, int pkttype, unsigned long pktlen )
|
||||
return G10ERR_WRITE_FILE; /* write error */
|
||||
}
|
||||
else if( !pktlen && pkttype == PKT_COMPRESSED ) {
|
||||
log_debug("copy_packet: compressed!\n");
|
||||
/* compressed packet, copy till EOF */
|
||||
while( (n = iobuf_read( inp, buf, 100 )) != -1 )
|
||||
if( iobuf_write(out, buf, n ) )
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* passphrase.c - Get a passphrase
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* pkclist.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -205,6 +205,8 @@ edit_ownertrust( ulong lid, int mode )
|
||||
|
||||
/****************
|
||||
* Try to add some more owner trusts (interactive)
|
||||
* This function presents all the signator in a certificate
|
||||
* chain who have no trust value assigned.
|
||||
* Returns: -1 if no ownertrust were added.
|
||||
*/
|
||||
static int
|
||||
@ -232,10 +234,18 @@ _("Could not find a valid trust path to the key. Let's see whether we\n"
|
||||
if( lid == pk->local_id )
|
||||
continue;
|
||||
any=1;
|
||||
if( otrust == TRUST_UNDEFINED || otrust == TRUST_EXPIRED ||
|
||||
otrust == TRUST_UNKNOWN ) {
|
||||
if( changed ) {
|
||||
/* because enum_cert_paths() makes a snapshop of the
|
||||
* trust paths, the otrust and validity are not anymore
|
||||
* valid after changing an entry - we have to reread
|
||||
* those values from then on
|
||||
*/
|
||||
otrust = get_ownertrust( lid );
|
||||
}
|
||||
if( otrust == TRUST_UNDEFINED ) {
|
||||
any_undefined=1;
|
||||
enum_cert_paths_print( &context, NULL, lid );
|
||||
enum_cert_paths_print( &context, NULL, changed, lid );
|
||||
tty_printf("\n");
|
||||
rc = edit_ownertrust( lid, 0 );
|
||||
if( rc == -1 ) {
|
||||
*quit = 1;
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* plaintext.c - process an plaintext packet
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* pref.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* pref.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* pubkey-enc.c - public key encoded packet handling
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* revoke.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* ringedit.c - Function for key ring editing
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -298,7 +298,7 @@ add_keyblock_resource( const char *url, int force, int secret )
|
||||
else
|
||||
log_info(_("%s: keyring created\n"), filename );
|
||||
}
|
||||
#ifdef __MINGW32__
|
||||
#if __MINGW32__ || 1
|
||||
/* must close it again */
|
||||
iobuf_close( iobuf );
|
||||
iobuf = NULL;
|
||||
@ -687,6 +687,7 @@ enum_keyblocks( int mode, KBPOS *kbpos, KBNODE *ret_root )
|
||||
kbpos->resno = i;
|
||||
rentry = check_pos( kbpos );
|
||||
kbpos->rt = resource_table[i].rt;
|
||||
kbpos->valid = 0;
|
||||
switch( kbpos->rt ) {
|
||||
case rt_RING:
|
||||
kbpos->fp = iobuf_open( rentry->fname );
|
||||
@ -860,7 +861,7 @@ update_keyblock( KBPOS *kbpos, KBNODE root )
|
||||
* A string "GnuPG user db", a \n.
|
||||
* user ids of one key, delimited by \t,
|
||||
* a # or ^ followed by a 20 byte fingerprint, followed by an \n
|
||||
* The literal characters =, \n, \t, #, ^ must be replaced by a equal sign
|
||||
* The literal characters %, \n, \t, #, ^ must be replaced by a percent sign
|
||||
* and their hex value.
|
||||
*
|
||||
* (We use Boyer/Moore pattern matching)
|
||||
@ -1019,8 +1020,9 @@ keyring_search( PACKET *req, KBPOS *kbpos, IOBUF iobuf, const char *fname )
|
||||
init_packet(&pkt);
|
||||
save_mode = set_packet_list_mode(0);
|
||||
kbpos->rt = rt_RING;
|
||||
kbpos->valid = 0;
|
||||
|
||||
#if __MINGW32__
|
||||
#if __MINGW32__ || 1
|
||||
assert(!iobuf);
|
||||
iobuf = iobuf_open( fname );
|
||||
if( !iobuf ) {
|
||||
@ -1057,13 +1059,15 @@ keyring_search( PACKET *req, KBPOS *kbpos, IOBUF iobuf, const char *fname )
|
||||
BUG();
|
||||
free_packet(&pkt);
|
||||
}
|
||||
if( !rc )
|
||||
if( !rc ) {
|
||||
kbpos->offset = offset;
|
||||
kbpos->valid = 1;
|
||||
}
|
||||
|
||||
leave:
|
||||
free_packet(&pkt);
|
||||
set_packet_list_mode(save_mode);
|
||||
#if __MINGW32__
|
||||
#if __MINGW32__ || 1
|
||||
iobuf_close(iobuf);
|
||||
#endif
|
||||
return rc;
|
||||
@ -1089,6 +1093,8 @@ keyring_read( KBPOS *kbpos, KBNODE *ret_root )
|
||||
return G10ERR_OPEN_FILE;
|
||||
}
|
||||
|
||||
if( !kbpos->valid )
|
||||
log_debug("kbpos not valid in keyring_read, want %d\n", (int)kbpos->offset );
|
||||
if( iobuf_seek( a, kbpos->offset ) ) {
|
||||
log_error("can't seek to %lu\n", kbpos->offset);
|
||||
iobuf_close(a);
|
||||
@ -1112,6 +1118,12 @@ keyring_read( KBPOS *kbpos, KBNODE *ret_root )
|
||||
}
|
||||
/* make a linked list of all packets */
|
||||
switch( pkt->pkttype ) {
|
||||
case PKT_COMPRESSED:
|
||||
log_error("skipped compressed packet in keyring\n" );
|
||||
free_packet(pkt);
|
||||
init_packet(pkt);
|
||||
break;
|
||||
|
||||
case PKT_PUBLIC_KEY:
|
||||
case PKT_SECRET_KEY:
|
||||
if( in_cert )
|
||||
@ -1129,6 +1141,7 @@ keyring_read( KBPOS *kbpos, KBNODE *ret_root )
|
||||
}
|
||||
}
|
||||
ready:
|
||||
kbpos->valid = 0;
|
||||
if( rc == -1 && root )
|
||||
rc = 0;
|
||||
|
||||
@ -1174,6 +1187,12 @@ keyring_enum( KBPOS *kbpos, KBNODE *ret_root, int skipsigs )
|
||||
}
|
||||
/* make a linked list of all packets */
|
||||
switch( pkt->pkttype ) {
|
||||
case PKT_COMPRESSED:
|
||||
log_error("skipped compressed packet in keyring\n" );
|
||||
free_packet(pkt);
|
||||
init_packet(pkt);
|
||||
break;
|
||||
|
||||
case PKT_PUBLIC_KEY:
|
||||
case PKT_SECRET_KEY:
|
||||
if( root ) { /* store this packet */
|
||||
@ -1387,6 +1406,7 @@ keyring_copy( KBPOS *kbpos, int mode, KBNODE root )
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
kbpos->valid = 0;
|
||||
}
|
||||
|
||||
if( mode == 2 || mode == 3 ) { /* delete or update */
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* seckey-cert.c - secret key certifucate packet handling
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* seskey.c - make sesssion keys etc.
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* sig-check.c - Check a signature
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* sign.c - sign data
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* signal.c - signal handling
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* skclist.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* status.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* status.h
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* tdbio.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* tdbio.h - Trust database I/O functions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* textfilter.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* trustdb.c
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -1750,7 +1750,8 @@ enum_cert_paths( void **context, ulong *lid,
|
||||
* Print the current path
|
||||
*/
|
||||
int
|
||||
enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid )
|
||||
enum_cert_paths_print( void **context, FILE *fp,
|
||||
int refresh, ulong selected_lid )
|
||||
{
|
||||
struct enum_cert_paths_ctx *ctx;
|
||||
TRUST_SEG_LIST tsl;
|
||||
@ -1760,11 +1761,32 @@ enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid )
|
||||
ctx = *context;
|
||||
if( !ctx->tsl )
|
||||
return;
|
||||
tsl = ctx->tsl;
|
||||
|
||||
if( !fp )
|
||||
fp = stderr;
|
||||
|
||||
print_path( ctx->tsl->pathlen, ctx->tsl->path, fp, selected_lid );
|
||||
if( refresh ) { /* update the ownertrust and if possible the validity */
|
||||
int i;
|
||||
int match = tdbio_db_matches_options();
|
||||
|
||||
for( i = 0; i < tsl->pathlen; i++ ) {
|
||||
TRUSTREC rec;
|
||||
|
||||
read_record( tsl->path[i].lid, &rec, RECTYPE_DIR );
|
||||
tsl->path[i].otrust = rec.r.dir.ownertrust;
|
||||
/* update validity only if we have it in the cache
|
||||
* calculation is too time consuming */
|
||||
if( match && (rec.r.dir.dirflags & DIRF_VALVALID)
|
||||
&& rec.r.dir.validity ) {
|
||||
tsl->path[i].trust = rec.r.dir.validity;
|
||||
if( rec.r.dir.dirflags & DIRF_REVOKED )
|
||||
tsl->path[i].trust = TRUST_FLAG_REVOKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print_path( tsl->pathlen, tsl->path, fp, selected_lid );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* trustdb.h - Trust database
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@ -53,7 +53,8 @@ int check_trust( PKT_public_key *pk, unsigned *r_trustlevel );
|
||||
int query_trust_info( PKT_public_key *pk );
|
||||
int enum_cert_paths( void **context, ulong *lid,
|
||||
unsigned *ownertrust, unsigned *validity );
|
||||
int enum_cert_paths_print( void **context, FILE *fp, ulong selected_lid );
|
||||
int enum_cert_paths_print( void **context, FILE *fp,
|
||||
int refresh, ulong selected_lid );
|
||||
unsigned get_ownertrust( ulong lid );
|
||||
int get_ownertrust_info( ulong lid );
|
||||
byte *get_pref_data( ulong lid, const byte *namehash, size_t *ret_n );
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* verify.c - verify signed data
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* g10m.c - Wrapper for MPI
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -2,14 +2,14 @@
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@ -1,14 +1,14 @@
|
||||
/* mpi-bit.c - MPI bit level fucntions
|
||||
* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
* GNUPG is free software; you can redistribute it and/or modify
|
||||
* GnuPG is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GNUPG is distributed in the hope that it will be useful,
|
||||
* GnuPG is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user