Uwe Gansert wrote:
> My solution is quite simple in X509 I call :
>
> my @attList = ( "SERIAL", "DN", "ISSUER", "NOTBEFORE", "NOTAFTER",
> "ALIAS", "MODULUS", "KEY", "FINGERPRINT", "HASH" );
> my $ret = $self->{backend}->getCertAttribute(
> ATTRIBUTE=>\@attList, DATA=>$self->getPEM());
>
> As you can see I pass an array ref instead of a single attribute. The return
> value is a hash reference. The $ret hash looks exactly like in the old version.
>
> In parseCertAttribute(...) I call openssl only on time with all attributes in
> one row. Parse the result (which is a little bit more expensive than before) and
> return the hashref.
>
> All in all, quite simple, no magic and the best thing ... it seems to work. But
> that's partly your job. Please test it. For me it worked fine but maybe I
> overlooked a bug.
To prevent incomatibility issues, we could use two different methods for calling
the getCertAttribute: the first as it was before passing $k (this remains for
backward compatibility) and the second method could be:
my $ret = $self->{backend}->getCertAttribute(
ATTRIBUTE_LIST=>\@attList, DATA=>$self->getPEM());
As you can see just some coding needs to be done in the getCertAttribute sub to
maintain the compatibility. Let me know if this solution is ok with you too.
--
C'you,
Massimiliano Pala
--o-------------------------------------------------------------------------
Massimiliano Pala [OpenCA Project Manager] [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.openca.org Tel.: +39 (0)59 270 094
http://openca.sourceforge.net Mobile: +39 (0)347 7222 365
S/MIME Cryptographic Signature