<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package PGP::Certificate::Subkey;

use strict;

BEGIN {
    no strict 'refs';

    foreach my $accessor (qw(created expires pkalg modlength
			     fingerprint keyid)) {
	*{$accessor} = sub {
	    my ($this) = @_;
	    $this-&gt;{"packet"}-&gt;{$accessor};
	};
    }

    foreach my $accessor (qw(packet revocation binding)) {
	*{$accessor} = sub {
	    my ($this) = @_;
	    $this-&gt;{$accessor};
	};
    }
};

sub new {
    my ($classname, $packet) = @_;

    bless {
	"packet" =&gt; $packet,
    }, $classname;
}

sub set_revocation {
    my ($self, $sig) = @_;

    if (!$self-&gt;{"revocation"} ||
	$self-&gt;{"revocation"}-&gt;created &lt; $sig-&gt;created) {
	$self-&gt;{"revocation"} = $sig;
    }
}

sub set_binding {
    my ($self, $sig) = @_;

    if (!$self-&gt;{"binding"} ||
	$self-&gt;{"binding"}-&gt;created &lt; $sig-&gt;created) {
	$self-&gt;{"binding"} = $sig;
    }
}

1;
</pre></body></html>