- find_keys(search, keyid, ishex, false, false, true);
+ find_keys(search, keyid, ishex, fingerprint,
+ false, true);
+ } else if (!strcmp("getphoto", argv[optind])) {
+ if (!ishex) {
+ puts("Can't get a key on uid text."
+ " You must supply a keyid.");
+ } else if (fetch_key(keyid, &keys, false)) {
+ unsigned char *photo = NULL;
+ size_t length = 0;
+
+ if (getphoto(keys, 0, &photo, &length)) {
+ fwrite(photo,
+ 1,
+ length,
+ stdout);
+ }
+ free_publickey(keys);
+ keys = NULL;
+ } else {
+ puts("Key not found");
+ }