Check-in [e3b94c4a74]
Bounty program for improvements to Tcl and certain Tcl packages.
Overview
Comment:Minor casting to address compiler warnings
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tls-1-7
Files: files | file ages | folders
SHA1: e3b94c4a74bb0fd396c5282a0d63fcce1b9d83af
User & Date: rkeene on 2016-12-02 19:00:29
Other Links: branch diff | manifest | tags
Context
2016-12-02
19:39
Cleanup BIO creation to be more correct check-in: f0312b63df user: rkeene tags: tls-1-7
19:00
Minor casting to address compiler warnings check-in: e3b94c4a74 user: rkeene tags: tls-1-7
18:58
Double check that we got a usable value at all from the verification callback check-in: 664badad67 user: rkeene tags: tls-1-7
Changes

Modified tls.c from [95469d79b3] to [606371c2d5].

1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488







1489
1490
1491
1492
1493
1494
1495
1475
1476
1477
1478
1479
1480
1481







1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495






-
-
-
-
-
-
-
+
+
+
+
+
+
+







		ASN1_INTEGER_set(X509_get_serialNumber(cert),serial);
		X509_gmtime_adj(X509_get_notBefore(cert),0);
		X509_gmtime_adj(X509_get_notAfter(cert),(long)60*60*24*days);
		X509_set_pubkey(cert,pkey);
		
		name=X509_get_subject_name(cert);

		X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, k_C, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, k_ST, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, k_L, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, k_O, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, k_OU, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, k_CN, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, k_Email, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, (unsigned char *) k_C, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, (unsigned char *) k_ST, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, (unsigned char *) k_L, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, (unsigned char *) k_O, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, (unsigned char *) k_OU, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, (unsigned char *) k_CN, -1, -1, 0);
		X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, (unsigned char *) k_Email, -1, -1, 0);

		X509_set_subject_name(cert,name);

		if (!X509_sign(cert,pkey,EVP_md5())) {
		    X509_free(cert);
		    EVP_PKEY_free(pkey);
		    Tcl_SetResult(interp,"Error signing certificate",NULL);