summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/cert.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-10 15:16:52 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-10 15:18:31 +0100
commit54e223d1b0aecc458fdfd78f7ed6a14a2fd59cc6 (patch)
tree8cb35937e71daa3a4164ebf4b20c2e16b61a3282 /openpgp/src/serialize/cert.rs
parent11af81b1493ac3473d0cc88d1b1ecafade0d1e2e (diff)
openpgp: Consider sensitive designated revokers when exporting sigs.
Diffstat (limited to 'openpgp/src/serialize/cert.rs')
-rw-r--r--openpgp/src/serialize/cert.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/openpgp/src/serialize/cert.rs b/openpgp/src/serialize/cert.rs
index 1297d317..6e398265 100644
--- a/openpgp/src/serialize/cert.rs
+++ b/openpgp/src/serialize/cert.rs
@@ -47,7 +47,7 @@ impl Cert {
|o: &mut dyn std::io::Write, sig: &Signature| -> Result<()>
{
if export {
- if sig.exportable_certification().unwrap_or(true) {
+ if sig.exportable().is_ok() {
PacketRef::Signature(sig).export(o)?;
}
} else {
@@ -71,7 +71,7 @@ impl Cert {
for u in self.userids().bundles() {
if export && ! u.self_signatures().iter().chain(u.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -94,7 +94,7 @@ impl Cert {
for u in self.user_attributes().bundles() {
if export && ! u.self_signatures().iter().chain(u.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -117,7 +117,7 @@ impl Cert {
for k in self.subkeys() {
if export && ! k.self_signatures().iter().chain(k.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -140,7 +140,7 @@ impl Cert {
for u in self.unknowns() {
if export && ! u.certifications().iter().any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -369,7 +369,7 @@ impl<'a> TSK<'a> {
|o: &mut dyn std::io::Write, sig: &Signature| -> Result<()>
{
if export {
- if sig.exportable_certification().unwrap_or(true) {
+ if sig.exportable().is_ok() {
PacketRef::Signature(sig).export(o)?;
}
} else {
@@ -422,7 +422,7 @@ impl<'a> TSK<'a> {
for u in self.cert.userids().bundles() {
if export && ! u.self_signatures().iter().chain(u.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -445,7 +445,7 @@ impl<'a> TSK<'a> {
for u in self.cert.user_attributes().bundles() {
if export && ! u.self_signatures().iter().chain(u.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -468,7 +468,7 @@ impl<'a> TSK<'a> {
for k in self.cert.subkeys() {
if export && ! k.self_signatures().iter().chain(k.self_revocations()).any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;
@@ -492,7 +492,7 @@ impl<'a> TSK<'a> {
for u in self.cert.unknowns() {
if export && ! u.certifications().iter().any(
- |s| s.exportable_certification().unwrap_or(true))
+ |s| s.exportable().is_ok())
{
// No exportable selfsig on this component, skip it.
continue;