gpg-rs / gpgme

GPGme bindings for Rust
GNU Lesser General Public License v2.1
83 stars 13 forks source link

Misleading example code in `context.rs`? #20

Closed vext01 closed 4 years ago

vext01 commented 6 years ago

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

vext01 commented 5 years ago

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