Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:6526: Inside #if constant(Standards.X509)
   report_error("Failed to read certificate %s.\n", file_name);    continue;    }       // Note: set_u_and_gid() hasn't been called yet,    // so there's no need for Privs.    Standards.PEM.Messages msgs = Standards.PEM.Messages(old_cert);       int upgrade_needed;    -  foreach(msgs->parts; string part; Standards.PEM.Message msg) { +  foreach(msgs->parts; string part; array(Standards.PEM.Message) msg) {    if (!has_suffix(part, "CERTIFICATE")) continue;    Standards.X509.TBSCertificate tbs = -  Standards.X509.decode_certificate(msg->body); +  Standards.X509.decode_certificate(msg[0]->body);    upgrade_needed = (tbs->version < 3);    break;    }       if (!upgrade_needed || (sizeof(msgs->parts) != 2)) continue;       // NB: We reuse the old key.    Crypto.Sign key; -  foreach(msgs->parts; string part; Standards.PEM.Message msg) { +  foreach(msgs->parts; string part; array(Standards.PEM.Message) msg) {    if (!has_suffix(part, "PRIVATE KEY")) continue; -  if (msg->headers["dek-info"]) { +  if (msg[0]->headers["dek-info"]) {    // Not supported here.    break;    } -  key = Standards.X509.parse_private_key(msg->body); +  key = Standards.X509.parse_private_key(msg[0]->body);    }    if (!key) continue;       report_notice("Renewing certificate: %O...\n", file_name);    cert = Roxen.generate_self_signed_certificate("*", key);   #endif /* constant(Standards.X509) */    }       if (cert) {    // Note: set_u_and_gid() hasn't been called yet,