gpg-rs / gpgme

GPGme bindings for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misleading example code in `context.rs`?

vext01 opened this issue · comments

The doc comment for find_key says:

/// Returns the public key with the specified fingerprint, if such a key can
/// be found. Otherwise, an error is returned.

The there are a couple of places which suggest that find_key accepts a pattern, not a finger print, e.g.:

https://github.com/johnschug/rust-gpgme/blob/fd15950293fdd6d3a28a0098bb40c78409ded642/src/context.rs#L1166-L1177

https://github.com/johnschug/rust-gpgme/blob/fd15950293fdd6d3a28a0098bb40c78409ded642/src/context.rs#L1237-L1248

So does find_key take a fingerprint or a pattern?

Thanks

I think this is related to the new get_key which really does accept a fingerprint, and not a pattern.