- find_keys(search, keyid, ishex, fingerprint, exact,
- true, mrhkp);
+ find_keys(search, keyid, fp, MAX_FINGERPRINT_LEN,
+ ishex, isfp, fingerprint, skshash,
+ exact, true, mrhkp);
+ break;
+ case OP_PHOTO:
+ if (isfp) {
+ config.dbbackend->fetch_key_fp(fp,
+ MAX_FINGERPRINT_LEN,
+ &publickey, false);
+ } else {
+ config.dbbackend->fetch_key_id(keyid,
+ &publickey, false);
+ }
+ if (publickey != NULL) {
+ unsigned char *photo = NULL;
+ size_t length = 0;
+
+ if (getphoto(publickey, indx, &photo,
+ &length) == ONAK_E_OK) {
+ fwrite(photo,
+ 1,
+ length,
+ stdout);
+ }
+ free_publickey(publickey);
+ publickey = NULL;
+ }