Check-in [925edeaa39]
Overview
SHA1:925edeaa39a594a1a6c0e25e3c2dbe5c419dfa08
Date: 2016-02-15 08:30:36
User: rkeene
Comment:ChromeOS: Minor cleanup in the test case
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-15
08:31
[ecd7178afb] Updated to print an error in debug mode if we run across compressed certificates without zlib support available (user: rkeene, tags: trunk)
08:30
[925edeaa39] ChromeOS: Minor cleanup in the test case (user: rkeene, tags: trunk)
07:49
[43490cab39] Minor cleanup (user: rkeene, tags: trunk)
Changes

Modified build/chrome/cackey-chrome-test.c from [335a817cb9] to [257a2172b2].

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
				pinPrompt = strdup("Please enter your PIN: ");
			}

			printf("%s: ", pinPrompt);
			fflush(stdout);

			free(pinPrompt);



			fgets(pin, sizeof(pin), stdin);
			while (strlen(pin) >= 1 && pin[strlen(pin) - 1] == '\n') {
				pin[strlen(pin) - 1] = '\0';
			}

			signLength = sizeof(signBuffer);
			rvSign = cackey_chrome_signMessage(&certificates[idxCertificate], "Test", 4, signBuffer, &signLength, &pinPrompt, pin);
		}





		printf("Signed message \"Test\": %lu bytes (return value = %i)\n", signLength, rvSign);
	}

	cackey_chrome_freeCertificates(certificates, numCertificates);

	cackey_chrome_terminate();

	return(0);
}







>
>









>
>
>
>










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
56
57
58
59
				pinPrompt = strdup("Please enter your PIN: ");
			}

			printf("%s: ", pinPrompt);
			fflush(stdout);

			free(pinPrompt);

			pinPrompt = NULL;

			fgets(pin, sizeof(pin), stdin);
			while (strlen(pin) >= 1 && pin[strlen(pin) - 1] == '\n') {
				pin[strlen(pin) - 1] = '\0';
			}

			signLength = sizeof(signBuffer);
			rvSign = cackey_chrome_signMessage(&certificates[idxCertificate], "Test", 4, signBuffer, &signLength, &pinPrompt, pin);
		}

		if (pinPrompt != NULL) {
			free(pinPrompt);
		}

		printf("Signed message \"Test\": %lu bytes (return value = %i)\n", signLength, rvSign);
	}

	cackey_chrome_freeCertificates(certificates, numCertificates);

	cackey_chrome_terminate();

	return(0);
}