Diff

Differences From Artifact [cb66151e80]:

To Artifact [f5c55ed5c6]:


1276
1277
1278
1279
1280
1281
1282

1283


1284
1285
1286
1287
1288
1289
1290
1276
1277
1278
1279
1280
1281
1282
1283

1284
1285
1286
1287
1288
1289
1290
1291
1292







+
-
+
+







			     "unable to set certificate file ", certfile, ": ",
			     REASON(), (char *) NULL);
	    SSL_CTX_free(ctx);
	    return (SSL_CTX *)0;
	}

	/* get the private key associated with this certificate */
	if (keyfile == NULL) {
	if (key == NULL) keyfile=certfile;
	    keyfile = certfile;
	}

	if (SSL_CTX_use_PrivateKey_file(ctx, F2N( keyfile, &ds),
					SSL_FILETYPE_PEM) <= 0) {
	    Tcl_DStringFree(&ds);
	    /* flush the passphrase which might be left in the result */
	    Tcl_SetResult(interp, NULL, TCL_STATIC);
	    Tcl_AppendResult(interp,
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318



1319
1320
1321
1322
1323
1324
1325
1311
1312
1313
1314
1315
1316
1317



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327







-
-
-
+
+
+







	    Tcl_AppendResult(interp,
			     "unable to set certificate: ",
			     REASON(), (char *) NULL);
	    SSL_CTX_free(ctx);
	    return (SSL_CTX *)0;
	}
	if (key == NULL) {
    key=cert;
    key_len = cert_len;
  }
	    key = cert;
	    key_len = cert_len;
	}
	if (SSL_CTX_use_PrivateKey_ASN1(EVP_PKEY_RSA, ctx, key,key_len) <= 0) {
	    Tcl_DStringFree(&ds);
	    /* flush the passphrase which might be left in the result */
	    Tcl_SetResult(interp, NULL, TCL_STATIC);
	    Tcl_AppendResult(interp,
			     "unable to set public key: ",
			     REASON(), (char *) NULL);