New answers tagged

1

This is making a prepared statement. It won't sanitize the inputs. At a low level, it's probably using the sqlite c api, and it would look something like: stmnt = sqlite3_prepare("INSERT INTO table (e1, e2) VALUES(?, ?)") sqlite3_bind_int(stmnt,0,V1) sqlite3_bind_blob(stmnt,1,V1) while((row = sqlite3_step(stmnt) != SQLITE_DONE){ //do something ...


0

The signature format was not correct, I've added the following: from asn1crypto.algos import DSASignature signature = priv.sign(info.dump(), mechanism=Mechanism.ECDSA_SHA1) value = DSASignature.from_p1363(signature).dump() csr = CertificationRequest({ 'certification_request_info': info, '...


1

PKCS11 (and also P1363) formats ECDSA signature by concatenating the two numbers r,s encoded as fixed-size unsigned; for P-256 that size is 32 octets giving signature of 64 octets. PKCS10, like X.509/PKIX, formats ECDSA signature as an ASN.1 SEQUENCE of two INTEGERs; each INTEGER in ASN.1 DER is variable-size signed (technically two's complement, but since ...


Top 50 recent answers are included