Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:2486:    res += ({ "<td colspan='2'><b>" +    LOC_C(0, "Invalid certificate") +    ".</b>" });    } else {    mapping(Standards.ASN1.Types.Identifier:string) dn =    parse_dn(tbs->subject);       string tmp;    if ((tmp = dn[Standards.PKCS.Identifiers.at_ids.commonName])) {    res += ({ -  sprintf("<td colspan='2'><b><tt>%s</tt></b>", +  sprintf("<td style='white-space:nowrap'>%s</td>" +  "<td><b><tt>%s</tt></b>", +  LOC_C(0, "Common Name"),    Roxen.html_encode_string(tmp)),    });    } else {    res += ({ "<td colspan='2'>" });    }       res[-1] += sprintf(" (%s, " + LOC_C(0, "%d bits") + ")</td>",    Roxen.html_encode_string(private_key->name()),    private_key->key_size());       if (tmp = dn[Standards.PKCS.Identifiers.at_ids.organizationName]) {    if (dn[Standards.PKCS.Identifiers.at_ids.organizationUnitName]) {    tmp += "/" +    dn[Standards.PKCS.Identifiers.at_ids.organizationUnitName];    }    res += ({    sprintf("<td style='white-space:nowrap'>%s</td><td>%s</td>", -  LOC_C(0, "Issued to"), +  LOC_C(0, "Issued To"),    Roxen.html_encode_string(tmp)),    });    } else if (tmp = dn[Standards.PKCS.Identifiers.at_ids.organizationUnitName]) {    res += ({    sprintf("<td style='white-space:nowrap'>%s</td><td>%s</td>", -  LOC_C(0, "Issued to"), +  LOC_C(0, "Issued To"),    Roxen.html_encode_string(tmp)),    });    }       if (tbs->issuer->get_der() == tbs->subject->get_der()) {    res += ({    sprintf("<td style='white-space:nowrap'>" + -  LOC_C(0, "Issued by") + +  LOC_C(0, "Issued By") +    "</td><td>%s</td>",    LOC_C(0, "Self-signed"))    });    } else {    dn = parse_dn(tbs->issuer);    tmp = dn[Standards.PKCS.Identifiers.at_ids.organizationName];    if (dn[Standards.PKCS.Identifiers.at_ids.organizationUnitName]) {    tmp = (tmp?(tmp + "/"):"") +    dn[Standards.PKCS.Identifiers.at_ids.organizationUnitName];    }
Roxen.git/server/base_server/roxen.pike:2540:    if (tmp2) {    if (tmp) {    tmp = tmp2 + " (" + tmp + ")";    } else {    tmp = tmp2;    }    }    if (tmp) {    res += ({    sprintf("<td style='white-space:nowrap;vertical-align:top'>" + -  LOC_C(0, "Issued by") + +  LOC_C(0, "Issued By") +    "</td><td>%s</td>",    Roxen.html_encode_string(tmp)),    });    }    }       tmp = Roxen.html_encode_string(Calendar.Second(tbs->not_after)->    format_time());    if (tbs->not_after < time(1)) {    // Already expired.
Roxen.git/server/base_server/roxen.pike:2575:    tmp),    });    } else {    res += ({    sprintf("<td>%s</td><td>%s</td>", LOC_C(0, "Expires"), tmp),    });    }       mapping keypair_metadata = CertDB.get_keypair_metadata(keypair_id);    -  array(string) paths = keypair_metadata->certs->pem_path + +  array(string) paths = +  keypair_metadata->certs->pem_path +    ({ keypair_metadata->key->pem_path }); -  if (sizeof(paths)) { +     paths = Array.uniq(paths); -  +  paths = replace(paths, 0, "__LOST__"); +  paths = map(paths, lfile_path);    res += ({ -  sprintf("<td style='vertical-align:top'>%s</td><td><tt>%s</tt></td>", +  sprintf("<td style='vertical-align:top'>%s</td><td>%s</td>",    LOC_C(0, "Path(s)"), -  map(paths, Roxen.html_encode_string) * "</tt><br/><tt>") +  map(paths, lambda(string p) { +  if (p) +  return "<tt>" + Roxen.html_encode_string(p) + "</tt>"; +  else +  return +  "<font color='&usr.warncolor;'>" + +  LOC_C(0, "Lost file") + +  "</font>"; +  }) * "<br/>")    });    } -  } +        return res;    }       string render_form(RequestID id, void|mapping additional_args) {    array(string) current = map(query(), _name);    string res = "<table width='100%'>\n";    foreach( get_choice_list(); int i; mixed elem ) {    if (i != 0) {    res += "<tr><td colspan='3'><hr/></td></tr>\n";