{"id":42879019,"url":"https://github.com/rnpgp/hkp_client","last_synced_at":"2026-01-30T14:26:46.275Z","repository":{"id":56876485,"uuid":"139549712","full_name":"rnpgp/hkp_client","owner":"rnpgp","description":"A minimalist client for PGP public keyservers","archived":false,"fork":false,"pushed_at":"2020-01-09T01:15:42.000Z","size":34,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-14T10:55:33.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnpgp.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-03T08:07:30.000Z","updated_at":"2024-07-22T02:12:18.000Z","dependencies_parsed_at":"2022-08-20T22:00:40.545Z","dependency_job_id":null,"html_url":"https://github.com/rnpgp/hkp_client","commit_stats":null,"previous_names":["riboseinc/hkp_client"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rnpgp/hkp_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fhkp_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fhkp_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fhkp_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fhkp_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnpgp","download_url":"https://codeload.github.com/rnpgp/hkp_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnpgp%2Fhkp_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-30T14:26:45.967Z","updated_at":"2026-01-30T14:26:46.258Z","avatar_url":"https://github.com/rnpgp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= HKP Client\n\nimage:https://img.shields.io/gem/v/hkp_client.svg[\"Gem Version\", link=\"https://rubygems.org/gems/hkp_client\"]\nimage:https://img.shields.io/travis/riboseinc/hkp_client/master.svg[\"Build Status\", link=\"https://travis-ci.org/riboseinc/hkp_client\"]\nimage:https://img.shields.io/codecov/c/github/riboseinc/hkp_client.svg[\"Test Coverage\", link=\"https://codecov.io/gh/riboseinc/hkp_client\"]\nimage:https://img.shields.io/codeclimate/maintainability/riboseinc/hkp_client.svg[\"Maintainability\", link=\"https://codeclimate.com/github/riboseinc/hkp_client/maintainability\"]\n\n:source-highlighter: pygments\n\nHKP Client is a minimalist HKP (OpenPGP HTTP Keyserver Protocol) client, which\nqueries PGP public keyservers, and downloads public keys.  It does not support\nsubmitting keys to keyserver.\n\nNOTE: This gem registers `hkp`, and `hkps` URI schemes (adds them to\n`URI.scheme_list`).\n\n== Usage\n\n=== Searching\n\nSearching by some criteria.  Returns search results as an array of arrays.\n\nThe search term does not have to be an e-mail address, but that's \n\nFor exact searches, an `exact` option can be set to true.  The meaning of\n\"exact\" is not defined by standard, and may be ignored by servers.\n\n[source,ruby]\n--------------------------------------------------------------------------------\nHkpClient.search \"linus@example.com\"\nHkpClient.search \"linus@example.com\", exact: true\n--------------------------------------------------------------------------------\n\nSearch operations returns an array of hashes.  In this case, it is a one-element\narray:\n\n[source,ruby]\n--------------------------------------------------------------------------------\n[\n  {\n    :key_id=\u003e\"06DA6D18CED048CE87E3E3A01CBBDA571B331AB5\",\n    :algorithm=\u003e\"1\",\n    :key_length=\u003e\"2048\",\n    :creation_date=\u003e\"1507718293\",\n    :expiration_date=\u003enil,\n    :flags=\u003enil,\n    :uids=\u003e[\n      {\n        :name=\u003e\"Linus Torvalds (Example) \u003clinus@example.com\u003e\",\n        :creation_date=\u003e\"1507718293\",\n        :expiration_date=\u003enil,\n        :flags=\u003enil\n      }\n    ]\n  }\n]\n--------------------------------------------------------------------------------\n\nEach array item describes a primary key uploaded to keyserver, and is associated\nwith one or more UIDs.  For field descriptions, refer to\nhttps://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5.2[HKP draft,\nsection 5.2].\n\nUID's name is already percent-decoded.  Other values may require parsing or\ncasting (e.g. timestamps and numbers).\n\nSearch results may include expired keys.  If that's unwanted, these keys must\nbe filtered out by user.\n\n=== Fetching keys\n\nOperation returns the ASCII-armored keyring as defined in\nhttps://tools.ietf.org/html/rfc2440#section-11.1[RFC 2440, section 11.1],\nor `nil`.\n\nFor example, executing following snippet:\n\n[source,ruby]\n--------------------------------------------------------------------------------\nHkpClient.get \"linus@example.com\"\n--------------------------------------------------------------------------------\n\nwill return string similar to:\n\n--------------------------------------------------------------------------------\n-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: SKS 1.1.6\nComment: Hostname: pgp.lehigh.edu\n\nmQENBFnd9JUBCAC1NMfsImuRAUcsKEjdLlSj0THHNytUDE8CB2I728gJAeixdZMEcPpRKHfc\nBXjW+Q864S4yEY4xgaboFkg/qABA/o0PWzZn2AzhvD5gzrfpfvK4BMrgOtPya7MySgImG1NC\nUYqj2vvJt4/bh8MWxSqvADB3SfLNueBQGvISeGwss9kYHEqoP0lxNSEJPJJpLKeqSov7mZOz\n(…)\nc2gFngOSVOrxJswb8/BUkA==\n=jGC1\n-----END PGP PUBLIC KEY BLOCK-----\n--------------------------------------------------------------------------------\n\n=== Arbitrary queries\n\nWhen above two methods are not flexible enough, a `#query` method can be\ncalled.  It returns an instance of `Faraday::Response`.  All the arguments\nbecome query string parameters (with exception of `keyserver`, which is\ndescribed in the next section).\n\nFor example, a following snippet performs a `vindex` operation for\n`linus@example.com` query.  The `mr` option specifies that search results should\nbe presented in a machine-readable format.  By default, a human-readable format\nis used, typically HTML.\n\n[source,ruby]\n--------------------------------------------------------------------------------\nHkpClient.query(op: \"vindex\", search: \"linus@example.com\", options: \"mr\")\n--------------------------------------------------------------------------------\n\n=== Using custom keyserver\n\nA `keyserver` option can be passed to either `#search`, `#get`, or `#query`\nmethod.  Accepted URI schemes are `http`, `https`, `hkp`, and `hkps`.\n\nTODO: Easy support for custom certificates.\n\n[source,ruby]\n--------------------------------------------------------------------------------\nHkpClient.get \"linus@example.com\", keyserver: \"hkp://server.you.want:8888\"\n--------------------------------------------------------------------------------\n\n== Contributing\n\nFirst, thank you for contributing!  We love pull requests from everyone.\nBy participating in this project, you hereby grant Ribose Inc. the right to\ngrant or transfer an unlimited number of non exclusive licenses or sub-licenses\nto third parties, under the copyright covering the contribution to use\nthe contribution by all means.\n\nHere are a few technical guidelines to follow:\n\n1.  Open an issue to discuss a new feature prior implementing it.\n2.  Write tests for new features or bugfixes.\n3.  Make sure the entire test suite passes locally and on CI.\n4.  Follow our style guide (you can validate your contribution locally with\n    Rubocop, also Hound CI will report any offences when you open a pull\n    request).\n\n== Credits\n\nThis gem is developed, maintained and funded by\nhttps://www.ribose.com[Ribose Inc].\n\n== License\n\nThe gem is available as open source under the terms of the\nhttps://opensource.org/licenses/MIT[MIT License].\n\n== Resources\n\n- https://tools.ietf.org/html/draft-shaw-openpgp-hkp-00[HKP protocol definition (IETF draft)]\n- http://www.mit.edu/afs/net.mit.edu/project/pks/thesis/paper/thesis.html[A PGP Public Key Server thesis]\n- https://www.openpgp.org/about/standard/[More documents on OpenPGP]\n- https://sks-keyservers.net/[SKS keyservers]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnpgp%2Fhkp_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnpgp%2Fhkp_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnpgp%2Fhkp_client/lists"}