pike.git
/
lib
/
modules
/
Crypto.pmod
/
DSA.pmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Crypto.pmod/DSA.pmod:333:
} // FIXME: Consider implementing RFC 6979. #define Object Standards.ASN1.Types.Object //! Verify PKCS-1 signature @[sign] of message @[message] using hash //! algorithm @[h]. int(0..1) pkcs_verify(string(8bit) message, .Hash h, string(8bit) sign) {
-
Object a = Standards.ASN1.Decode.secure_der_decode(sign);
+
object(
Object
)|zero
a = Standards.ASN1.Decode.secure_der_decode(sign);
// The signature is the DER-encoded ASN.1 sequence Dss-Sig-Value // with the two integers r and s. See RFC 3279 section 2.2.2. if (!a || (a->type_name != "SEQUENCE") || (sizeof([array]a->elements) != 2) || (sizeof( ([array(object(Object))]a->elements)->type_name - ({ "INTEGER" })))) return 0;