Subject: | Crypt-PKCS11-1.03 using Crypt::PKCS11::Attribute::Value in a template fails __check_pTemplate check |
Date: | Fri, 6 May 2016 12:51:45 +0300 |
To: | bug-Crypt-PKCS11 [...] rt.cpan.org |
From: | Tuure Vartiainen <vartiait [...] open.com.au> |
Hello,
with Crypt-PKCS11-1.03 when using Crypt::PKCS11::Attribute::Value in a template,
__check_pTemplate check seems to fail for the attribute.
More precisely SvUOK(sv) in crypt_pkcs11_xs_SvUOK(SV* sv) returns a non-zero value
when checking Crypt::PKCS11::Attribute::Value.
When comparing Crypt::PKCS11::Attribute::Label and Crypt::PKCS11::Attribute::Value types
being checked in crypt_pkcs11_xs_SvUOK(SV* sv), difference was
(SV) $4 = {
sv_any = 0x0000000101dbf648
sv_refcnt = 1
sv_flags = 21765
sv_u = {
svu_pv = 0x0000000102a13420 "3"
svu_iv = 4339086368
svu_uv = 4339086368
svu_nv = 2.1437935087668688E-314
svu_rv = 0x0000000102a13420
svu_rx = 0x0000000102a13420
svu_array = 0x0000000102a13420
svu_hash = 0x0000000102a13420
svu_gp = 0x0000000102a13420
svu_fp = 0x0000000102a13420
}
}
(SV) $5 = {
sv_any = 0x0000000101259b60
sv_refcnt = 1
sv_flags = 268452867
sv_u = {
svu_pv = 0x000000010067c6d0 "CKA_VALUE"
svu_iv = 4301768400
svu_uv = 4301768400
svu_nv = 2.1253559828054658E-314
svu_rv = 0x000000010067c6d0
svu_rx = 0x000000010067c6d0
svu_array = 0x000000010067c6d0
svu_hash = 0x000000010067c6d0
svu_gp = 0x000000010067c6d0
svu_fp = 0x000000010067c6d0
}
}
Crypt::PKCS11::Attribute::Value seemed to be an only class which direct parent
is Crypt::PKCS11::Attribute and which defines type() in a class itself.
Problem seemed to fix by renaming Crypt::PKCS11::Attribute::Value to
Crypt::PKCS11::Attribute::ValueBase and defining Crypt::PKCS11::Attribute::Value
in a same way as other attribute classes.
Perl version used is 5.23.8.
BR
--
Tuure Vartiainen <vartiait@open.com.au>
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.