Overview
Comment: | Added validation to verification |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
027525ece7fe32a6f8779c8d50f9b747 |
User & Date: | rkeene on 2018-07-01 21:50:10 |
Other Links: | manifest | tags |
Context
2018-07-01
| ||
22:04 | Added support for hashing arbitrary data check-in: 54a51a61b6 user: rkeene tags: trunk | |
21:50 | Added validation to verification check-in: 027525ece7 user: rkeene tags: trunk | |
20:55 | Ensure we include the headers for memcpy() check-in: f12cd8142a user: rkeene tags: trunk | |
Changes
Modified build/test/test.tcl from [9536bccf33] to [45be124a0a].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + - - + + - - - + + + + + + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + | #! /usr/bin/env tclsh lappend auto_path [file join [file dirname [info script]] .. ..] package require nano proc test1 {} { # Detached signature set data [binary decode hex 0000000000000000000000000000000000000000000000000000000000000000] set key [binary decode hex C4D214F19E706E9C7487CEF00DE8059200C32414F0ED82E5E33B523AEDF719BA] |
Modified nano.c from [6a8716cb4e] to [ca961d2702].
︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | + | } static int nano_tcl_verify_detached(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { int cso_ret; unsigned char *signature, *data, *signed_data, *public_key; int signature_length, data_length, signed_data_length, public_key_length; unsigned long long data_length_nacl; int result; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "data signature publicKey"); return(TCL_ERROR); } |
︙ | |||
221 222 223 224 225 226 227 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | + - + - - + - - - - + | } memcpy(signed_data, signature, signature_length); memcpy(signed_data + signature_length, data, data_length); data_length_nacl = data_length; cso_ret = crypto_sign_open(data, &data_length_nacl, signed_data, signed_data_length, public_key); result = 0; |
︙ |