Check-in [c947dc3c9c]
Overview
Comment:Removed some changes left over from debugging
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c947dc3c9ca92832cb5fda125d1ede0be1321a522903ed15e138826f9cd7b17b
User & Date: rkeene on 2018-07-02 06:20:11
Other Links: manifest | tags
Context
2018-07-02
06:20
When testing, print out helpful output check-in: 3dfda3b837 user: rkeene tags: trunk
06:20
Removed some changes left over from debugging check-in: c947dc3c9c user: rkeene tags: trunk
06:12
Build system improvements check-in: d62ac8ffe1 user: rkeene tags: trunk
Changes

Modified nano.c from [19478c9f83] to [fe2268da6a].

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20












-
+







#include <stdint.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <tcl.h>

#include "tweetnacl.h"
#include "blake2-supercop.h"

#define NANO_SECRET_KEY_LENGTH (crypto_sign_SECRETKEYBYTES - crypto_sign_PUBLICKEYBYTES)
#define NANO_PUBLIC_KEY_LENGTH (crypto_sign_PUBLICKEYBYTES)
#define TclNano_AttemptAlloc(x) ((void *) Tcl_Alloc(x))
#define TclNano_AttemptAlloc(x) ((void *) Tcl_AttemptAlloc(x))
#define TclNano_Free(x) Tcl_Free((char *) x)

#if defined(HAVE_GETRANDOM)
#  ifdef HAVE_SYS_RANDOM_H
#    include <sys/random.h>
#  endif

279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
279
280
281
282
283
284
285

286
287
288
289
290
291
292







-








		Tcl_SetResult(interp, "Internal error", NULL);

		return(TCL_ERROR);
	}

	verify_data_length_nacl = verify_data_length;
printf("cso sdl = %i, dl=%i, sl=%i\n", signed_data_length, data_length, signature_length);
	cso_ret = crypto_sign_open(verify_data, &verify_data_length_nacl, signed_data, signed_data_length, public_key);
	result = 0;
	if (cso_ret == 0) {
		result = 1;
	}

	TclNano_Free(signed_data);