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     28   				pinPrompt = strdup("Please enter your PIN: ");
    29     29   			}
    30     30   
    31     31   			printf("%s: ", pinPrompt);
    32     32   			fflush(stdout);
    33     33   
    34     34   			free(pinPrompt);
           35  +
           36  +			pinPrompt = NULL;
    35     37   
    36     38   			fgets(pin, sizeof(pin), stdin);
    37     39   			while (strlen(pin) >= 1 && pin[strlen(pin) - 1] == '\n') {
    38     40   				pin[strlen(pin) - 1] = '\0';
    39     41   			}
    40     42   
    41     43   			signLength = sizeof(signBuffer);
    42     44   			rvSign = cackey_chrome_signMessage(&certificates[idxCertificate], "Test", 4, signBuffer, &signLength, &pinPrompt, pin);
    43     45   		}
           46  +
           47  +		if (pinPrompt != NULL) {
           48  +			free(pinPrompt);
           49  +		}
    44     50   
    45     51   		printf("Signed message \"Test\": %lu bytes (return value = %i)\n", signLength, rvSign);
    46     52   	}
    47     53   
    48     54   	cackey_chrome_freeCertificates(certificates, numCertificates);
    49     55   
    50     56   	cackey_chrome_terminate();
    51     57   
    52     58   	return(0);
    53     59   }