我已经成功使用非对称密钥和证书来跟踪this website在码头上配置SSL。
现在,我想使用对称密钥在jetty上配置SSL。
我使用keytool通过以下命令生成对称密钥:
org.eclipse.equinox.http.jetty.https.enabled=true
org.eclipse.equinox.http.jetty.https.port=8443
org.eclipse.equinox.http.jetty.ssl.password=password
org.eclipse.equinox.http.jetty.ssl.keypassword= password
org.eclipse.equinox.http.jetty.ssl.keystore=/Users/user/key/mykeystore
org.eclipse.equinox.http.jetty.ssl.protocol=TLSv1.2
然后,我在jetty上配置密钥库及其密码。
$(function() {
var dateArray = []; // for storing selected date as an array
$('.date-picker').datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: "MM yy",
onClose: function(dateText, inst) {
var isNotDuplicated = true; // for checking duplicated
var months = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, months, 1));
var monthSelect = $("#monthSelector").val();
var d = new Date(monthSelect).getTime();
// each time we have a new selected date, we check it for duplicated before using it
for(let dd of dateArray) {
if(d == dd) {
// new selected date is duplicated, so we set flag isNotDuplicated to false, that will cause logics below to ignore it.
isNotDuplicated = false;
break;
}
}
if(isNotDuplicated) {
// new date is not duplicated, so we use it.
dateArray.push(d);
$("#month").val($("#month").val() + d + ",");
}
}
});
});
当我使用Chrome连接到该网站时,该网站显示:
Jetty是否支持这种方式,使用对称密钥(tls-psk)来配置SSL?