Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F27325975
D149.id977.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
D149.id977.diff
View Options
Index: b/keyserver/gpgkeys_hkp.c
===================================================================
--- b/keyserver/gpgkeys_hkp.c
+++ b/keyserver/gpgkeys_hkp.c
@@ -241,9 +241,10 @@
get_key(char *getkey)
{
CURLcode res;
- char request[MAX_URL+60];
+ char request[MAX_URL+92];
char *offset;
struct curl_writer_ctx ctx;
+ size_t keylen;
memset(&ctx,0,sizeof(ctx));
@@ -269,14 +270,19 @@
strcat(request,port);
strcat(request,opt->path);
/* request is MAX_URL+55 bytes long - MAX_URL covers the whole URL,
- including any supplied path. The 60 overcovers this /pks/... etc
- string plus the 8 bytes of key id */
+ including any supplied path. The 92 overcovers this /pks/... etc
+ string plus the 8, 16, or 40 bytes of key id/fingerprint */
append_path(request,"/pks/lookup?op=get&options=mr&search=0x");
- /* fingerprint or long key id. Take the last 8 characters and treat
- it like a short key id */
- if(strlen(getkey)>8)
- offset=&getkey[strlen(getkey)-8];
+ /* send only fingerprint, long key id, or short keyid. see:
+ https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-3.1.1.1 */
+ keylen = strlen(getkey);
+ if(keylen >= 40)
+ offset=&getkey[keylen-40];
+ else if(keylen >= 16)
+ offset=&getkey[keylen-16];
+ else if(keylen >= 8)
+ offset=&getkey[keylen-8];
else
offset=getkey;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 28, 7:57 AM (5 h, 58 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
80/a7/d76d7d250f0c7fc3249c4f239161
Attached To
D149: 332_1340.diff
Event Timeline
Log In to Comment