Roxen.git
/
server
/
config_actions
/
make_csr.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/config_actions/make_csr.pike:1:
/*
-
* $Id: make_csr.pike,v 1.
11
1999/05/13 23:
15
:
26
mast Exp $
+
* $Id: make_csr.pike,v 1.
12
1999/05/13 23:
35
:
14
mast Exp $
*/ inherit "wizard"; import Standards.PKCS; #if constant(Standards.ASN1.Types) //0.6 feature import Standards.ASN1.Types; #else import Standards.ASN1.Encode; #endif /* constant(Standards.ASN1.Types) */
Roxen.git/server/config_actions/make_csr.pike:67:
{ return ("<font size=+1>Your Distinguished Name?</font><p>" "<help><blockquote>" "Your X.501 Distinguished Name consists of a chain of attributes " "and values, where each link in the chain defines more precisely " "who you are. Which attributes are necessary or useful " "depends on what you will use the certificate for, and which " "Certificate Authority you use. This page lets you specify " "the most useful attributes. If you leave a field blank, " "that attribute will be omitted from your name.<p>\n"
-
"
Unfortunately,
all
fields
should
be
in
US-ASCII."
+
"
Although
most
browsers will accept 8 bit ISO 8859-1 characters in "
+
"these
fields
,
it
can't
be
counted
on. To be on the safe side, "
+
"use only
US-ASCII.
\n
"
"</blockquote></help>" "<var name=countryName type=string default=SE><br>" "Your country code<br>\n" "<help><blockquote>" "Your two-letter country code, for example GB (United Kingdom). " "This attribute is required." "</blockquote></help>" "<var name=stateOrProvinceName type=string><br>"
Roxen.git/server/config_actions/make_csr.pike:214:
{ array a = trim->split(id->variables[attr]); if (a) attrs[attr] = a[0]; } } array name = ({ }); if (attrs->countryName) name += ({(["countryName": asn1_printable_string (attrs->countryName)])});
+
object printable_invalid_chars = Regexp ("([^-A-Za-z0-9 '()+,./:=?])");
foreach( ({ "stateOrProvinceName", "localityName", "organizationName", "organizationUnitName", "commonName" }), attr) { if (attrs[attr])
-
name += ({ ([ attr : asn1_T61_string(attrs[attr]) ]) });
+
name += ({ ([ attr :
(printable_invalid_chars->match (attrs[attr]) ?
+
asn1_T61_string
:
+
asn1_printable_string)
(attrs[attr]) ]) });
} mapping csr_attrs = ([]); foreach( ({ "challengePassword" }), attr) { if (attrs[attr]) csr_attrs[attr] = ({ asn1_printable_string(attrs[attr]) }); } mapping cert_attrs = ([ ]);