Commit 4bfe318c authored by Tollef Fog Heen's avatar Tollef Fog Heen

* Only ask for hostname, drop questions about country, organisation and

  such.  Closes: 230391, 287692.

git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/ssl-cert@580 01b336ce-410b-0410-9a02-a0e7f243c266
parent 95b78321
......@@ -29,6 +29,8 @@ ssl-cert (1.0.15) UNRELEASED; urgency=low
* Add set -e to postinst and postrm. Closes: 384591
* Make default openssl config pull RANDFILE from the environment.
Closes: 384595.
* Only ask for hostname, drop questions about country, organisation and
such. Closes: 230391, 287692.
-- Tollef Fog Heen <tfheen@debian.org> Sun, 10 Feb 2008 20:22:54 +0100
......
......@@ -7,52 +7,6 @@
# Even minor modifications require translation updates and such
# changes should be coordinated with translators and reviewers.
Template: make-ssl-cert/countryname
Type: string
_DefaultChoice: GB
_Description: Country code:
Please enter the two-letter ISO-3166 code to use in the SSL certificate.
.
It will become the 'countryName' field of the generated SSL certificate.
Template: make-ssl-cert/statename
Type: string
_DefaultChoice: Scotland
_Description: Some-State
Please enter the name of the administrative subdivision to use in the SSL
certificate.
.
It will become the 'stateOrProvinceName' field of the generated SSL
certificate.
Template: make-ssl-cert/localityname
Type: string
_DefaultChoice: Some-Locality
_Description: Locality name:
Please enter the name of the city or town to use in the SSL
certificate.
.
It will become the 'localityName' field of the generated SSL certificate.
Template: make-ssl-cert/organisationname
Type: string
_DefaultChoice: One Organization
_Description: Organization name:
Please enter the name of the company or organization to use in the SSL
certificate.
.
It will become the 'organisationName' field of the generated SSL certificate.
Template: make-ssl-cert/ouname
Type: string
_DefaultChoice: One Organization Unit
_Description: Organizational unit name:
Please enter the name of the division or section of the organization to use
in the SSL certificate.
.
It will become the 'organisationalUnitName' field of the generated
SSL certificate.
Template: make-ssl-cert/hostname
Type: string
Default: localhost
......@@ -60,16 +14,6 @@ _Description: Host name:
Please enter the host name to use in the SSL certificate.
.
It will become the 'commonName' field of the generated SSL certificate.
.
This value is mandatory.
Template: make-ssl-cert/email
Type: string
Default: webmaster@localhost
_Description: Email address:
Please enter the email address to use in the SSL certificate.
.
It will become the 'email' field of the generated SSL certificate.
Template: make-ssl-cert/title
Type: title
......
......@@ -9,66 +9,25 @@ db_capb backup
ask_via_debconf() {
db_settitle make-ssl-cert/title
templates="countryname statename localityname organisationname ouname hostname email"
for i in $templates; do
RET=""
while [ "x$RET" = "x" ]; do
db_fset make-ssl-cert/$i seen false
db_input high make-ssl-cert/$i || true
db_go
db_get make-ssl-cert/$i
done
done
db_get make-ssl-cert/countryname
CountryName="$RET"
db_fset make-ssl-cert/countryname seen false
db_get make-ssl-cert/statename
StateName="$RET"
db_fset make-ssl-cert/statename seen false
db_get make-ssl-cert/localityname
LocalityName="$RET"
db_fset make-ssl-cert/localityname seen false
db_get make-ssl-cert/organisationname
OrganisationName="$RET"
db_fset make-ssl-cert/organisationname seen false
db_get make-ssl-cert/ouname
OUName="$RET"
db_fset make-ssl-cert/ouname seen false
db_get make-ssl-cert/hostname
HostName="$RET"
db_fset make-ssl-cert/hostname seen false
db_get make-ssl-cert/email
Email="$RET"
db_fset make-ssl-cert/email seen false
RET=""
while [ "x$RET" = "x" ]; do
db_fset make-ssl-cert/hostname seen false
db_input high make-ssl-cert/hostname || true
db_go
db_get make-ssl-cert/hostname
done
db_get make-ssl-cert/hostname
HostName="$RET"
db_fset make-ssl-cert/hostname seen false
}
make_snakeoil() {
CountryName="XX"
StateName="There is no such thing outside US"
LocalityName="Everywhere"
OrganisationName="OCOSA"
OUName="Office for Complication of Otherwise Simple Affairs"
HostName="$(hostname -f)"
Email="root@$HostName"
}
create_temporary_cnf() {
sed -e s#@CountryName@#"$CountryName"# \
-e s#@StateName@#"$StateName"# \
-e s#@LocalityName@#"$LocalityName"# \
-e s#@OrganisationName@#"$OrganisationName"# \
-e s#@OUName@#"$OUName"# \
-e s#@HostName@#"$HostName"# \
-e s#@Email@#"$Email"# \
$template > $TMPFILE
sed -e s#@HostName@#"$HostName"# $template > $TMPFILE
}
# Takes two arguments, the base layout and the output cert.
......
......@@ -9,12 +9,7 @@ default_bits = 1024
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
prompt = no
policy = policy_anything
[ req_distinguished_name ]
countryName = @CountryName@
stateOrProvinceName = @StateName@
localityName = @LocalityName@
organizationName = @OrganisationName@
organizationalUnitName = @OUName@
commonName = @HostName@
emailAddress = @Email@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment