Use new values from /api/bootstrap
This commit is contained in:
parent
c5a452933a
commit
d8d5b5f6bc
@ -103,11 +103,15 @@ function onKeyGen() {
|
|||||||
let algorithm;
|
let algorithm;
|
||||||
if (authority.certificate.algorithm == "rsa") {
|
if (authority.certificate.algorithm == "rsa") {
|
||||||
algorithm = getAlgorithmParameters(
|
algorithm = getAlgorithmParameters(
|
||||||
window.authority.certificate.key_type_specific, "generatekey");
|
window.authority.certificate.signature_algorithm, "generatekey");
|
||||||
}
|
}
|
||||||
if (authority.certificate.algorithm == "ec") {
|
if (authority.certificate.algorithm == "ec") {
|
||||||
algorithm = getAlgorithmParameters(
|
if(authority.certificate.curve.startsWith("secp")) {
|
||||||
window.authority.certificate.curve, "generatekey");
|
algorithm = getAlgorithmParameters(
|
||||||
|
"ECDSA", "generatekey");
|
||||||
|
algorithm.algorithm.namedCurve =
|
||||||
|
`P-${authority.certificate.curve.slice(4,7)}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ("hash" in algorithm.algorithm)
|
if ("hash" in algorithm.algorithm)
|
||||||
algorithm.algorithm.hash.name = window.authority.certificate.hash_algorithm;
|
algorithm.algorithm.hash.name = window.authority.certificate.hash_algorithm;
|
||||||
@ -312,12 +316,6 @@ async function onHashChanged() {
|
|||||||
success: async function(authority) {
|
success: async function(authority) {
|
||||||
window.authority = authority
|
window.authority = authority
|
||||||
|
|
||||||
// convert "sha512" to "SHA-512"
|
|
||||||
window.authority.certificate.hash_algorithm =
|
|
||||||
(window.authority.certificate.hash_algorithm.slice(0,3) +
|
|
||||||
"-" + window.authority.certificate.hash_algorithm.slice(3))
|
|
||||||
.toUpperCase();
|
|
||||||
|
|
||||||
var prefix = "unknown";
|
var prefix = "unknown";
|
||||||
for (i in DEVICE_KEYWORDS) {
|
for (i in DEVICE_KEYWORDS) {
|
||||||
var keyword = DEVICE_KEYWORDS[i];
|
var keyword = DEVICE_KEYWORDS[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user