diff options
author | David Shaw <dshaw@jabberwocky.com> | 2006-03-09 02:15:18 +0100 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2006-03-09 02:15:18 +0100 |
commit | 0f7b4371b2d19108668f4a3a055ac62c831cc3d3 (patch) | |
tree | 4804b7196d65a0261a39a0a7e77514ca918c6f0d /g10/keygen.c | |
parent | * packet.h, build-packet.c (sig_to_notation), keygen.c (diff) | |
download | gnupg2-0f7b4371b2d19108668f4a3a055ac62c831cc3d3.tar.xz gnupg2-0f7b4371b2d19108668f4a3a055ac62c831cc3d3.zip |
* packet.h, build-packet.c (sig_to_notation), keygen.c
(keygen_add_notations): Provide printable text for non-human-readable
notation values.
Diffstat (limited to 'g10/keygen.c')
-rw-r--r-- | g10/keygen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index 0ef2499b6..971f8398c 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -708,7 +708,7 @@ keygen_add_notations(PKT_signature *sig,void *opaque) n1=strlen(notation->name); if(notation->altvalue) n2=strlen(notation->altvalue); - else if(!notation->flags.human) + else if(notation->bdat) n2=notation->blen; else n2=strlen(notation->value); @@ -716,7 +716,7 @@ keygen_add_notations(PKT_signature *sig,void *opaque) buf = xmalloc( 8 + n1 + n2 ); /* human readable or not */ - buf[0] = notation->flags.human?0x80:0; + buf[0] = notation->bdat?0:0x80; buf[1] = buf[2] = buf[3] = 0; buf[4] = n1 >> 8; buf[5] = n1; @@ -725,6 +725,8 @@ keygen_add_notations(PKT_signature *sig,void *opaque) memcpy(buf+8, notation->name, n1 ); if(notation->altvalue) memcpy(buf+8+n1, notation->altvalue, n2 ); + else if(notation->bdat) + memcpy(buf+8+n1, notation->bdat, n2 ); else memcpy(buf+8+n1, notation->value, n2 ); build_sig_subpkt( sig, SIGSUBPKT_NOTATION | |