Permalink
Browse files

* Defining line_not_blank().

        Stefan H. Holek <stefan>
* Enhancing Public_Key_Encrypted_Session_Key_Packet().
        Stefan H. Holek <stefan>
        Brian M. Carlson <karlsson>
  • Loading branch information...
1 parent 727a839 commit 5c657fcac1cf3713bb412ef6c7f911f3d822ab4c @kazu-yamamoto committed Feb 19, 2010
Showing with 32 additions and 4 deletions.
  1. +8 −0 CHANGES
  2. +14 −1 buffer.c
  3. +1 −1 pgpdump.c
  4. +9 −2 tagfuncs.c
View
@@ -1,5 +1,13 @@
Change Log
+0.11 2001/05/20
+
+* Defining line_not_blank().
+ Stefan H. Holek <stefan>
+* Enhancing Public_Key_Encrypted_Session_Key_Packet().
+ Stefan H. Holek <stefan>
+ Brian M. Carlson <karlsson>
+
0.10 2001/05/08
* Fixing key_server_preferences().
View
@@ -2,10 +2,12 @@
* buffer.c
*/
+#include <ctype.h>
#include "pgpdump.h"
typedef unsigned char byte;
+private int line_not_blank(char *);
private int read_binary(byte *, unsigned int);
private int read_radix64(byte *, unsigned int);
private int decode_radix64(byte *, unsigned int);
@@ -59,6 +61,17 @@ base256[] = {
};
private int
+line_not_blank(char *s)
+{
+ while (isspace(*s)) {
+ if (*s == CR || *s == LF)
+ return NO;
+ s++;
+ }
+ return YES;
+}
+
+private int
read_binary(byte *p, unsigned int max)
{
/* errno */
@@ -88,7 +101,7 @@ read_radix64(byte *p, unsigned int max)
do {
if (fgets(tmpbuf, BUFSIZ, stdin) == NULL)
warn_exit("can't find PGP armor.");
- } while (tmpbuf[0] != CR && tmpbuf[0] != LF);
+ } while (line_not_blank(tmpbuf) == YES);
found = YES;
}
View
@@ -5,7 +5,7 @@
#include "pgpdump.h"
#include <stdarg.h>
-private char *pgpdump_version = "0.10, Copyright (C) 1998-2001 Kazu Yamamoto";
+private char *pgpdump_version = "0.11, Copyright (C) 1998-2001 Kazu Yamamoto";
private char *prog;
private void usage(void);
View
@@ -20,11 +20,18 @@ Public_Key_Encrypted_Session_Key_Packet(int len)
pub_algs(pub);
switch (pub) {
case 1:
+ case 2:
+ case 3:
multi_precision_integer("RSA m^e mod n");
break;
case 16:
- multi_precision_integer("DSA g^k mod p");
- multi_precision_integer("DSA m * y^k mod p");
+ case 20:
+ multi_precision_integer("ElGamal g^k mod p");
+ multi_precision_integer("ElGamal m * y^k mod p");
+ break;
+ case 17:
+ multi_precision_integer("DSA ?");
+ multi_precision_integer("DSA ?");
break;
default:
printf("\t\tunknown(pub %d)\n", pub);

0 comments on commit 5c657fc

Please sign in to comment.