Discussion:
EAP/TLS certificates and server questions
Thomas Maenner
2003-03-17 19:25:43 UTC
Permalink
Hello all,

I have a couple of maybe OT questions on certificates (And I am
relatively new to certificates and stuff...)

Thanks to the EAP/TLS Howto, I was able to setup the radius server and
get all the authentification I needed going.
Now the script, which creates the root certificate, generates root.pem
with a lifetime of 30 days.
After that authentification doesn't work, OK. Last month I recreated
everything. That's a pain...

- How can I extend them? Reuse them? What's the deal?


The second issue I have, is creating a secondary server as a backup.

I have the second box, with software up and running.

But again, the certificates:
- My first attempt - just copying them - didn't work. OK, just a try.
- Second, since the certs are tied to hostname, I recreated them - guess
what...

Anybody, who could give me some instructions on these.

Thanks a lot!

Tom

P.S. If this is too OT, please ignore.
--
Thomas Maenner
E-Mail: mailto:***@aehr.com




-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Artur Hecker
2003-03-19 11:15:29 UTC
Permalink
hi
Post by Thomas Maenner
Thanks to the EAP/TLS Howto, I was able to setup the radius server and
get all the authentification I needed going.
Now the script, which creates the root certificate, generates root.pem
with a lifetime of 30 days.
After that authentification doesn't work, OK. Last month I recreated
everything. That's a pain...
- How can I extend them? Reuse them? What's the deal?
no reuse. you have to set another expriration date. take a look at the
scripts.
Post by Thomas Maenner
I have the second box, with software up and running.
- My first attempt - just copying them - didn't work. OK, just a try.
why? what exactly did you copy and what exactly did you certify?
Post by Thomas Maenner
- Second, since the certs are tied to hostname, I recreated them - guess
what...
well, you have to look at what you are doing. are you sure that your
certificates are tied to the host address? because mine are not. and i
doubt that this is verified anyway. the server simply has a pair of keys
and both are signed and one of them (the private) is encrypted. the
posession of the decryption key enables the usage.


ciao
artur
--
Artur Hecker
Département Informatique et Réseaux, ENST Paris
http://www.infres.enst.fr/~hecker


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thomas Maenner
2003-03-19 19:08:58 UTC
Permalink
Thanks Artur,
Post by Artur Hecker
hi
Post by Thomas Maenner
Thanks to the EAP/TLS Howto, I was able to setup the radius server
and get all the authentification I needed going.
Now the script, which creates the root certificate, generates
root.pem with a lifetime of 30 days.
After that authentification doesn't work, OK. Last month I recreated
everything. That's a pain...
- How can I extend them? Reuse them? What's the deal?
no reuse. you have to set another expriration date. take a look at the
scripts.
Well, I didn't find any expiration date in my CA.root script.
In openssl.cnf I have:
default_days = 365 # how long to certify for
default_crl_days= 365
These only seem to affect the 'user' certs - gives them one year lifetime.

Using the script in http://www.impossiblereflex.com/8021x/eap-tls-HOWTO.htm

This is the script CA.root I am using.
---snipsnip---
#!/bin/sh/
SSL=/usr/local/openssl-certgen
export PATH=${SSL}/bin/:${SSL}/ssl/misc:${PATH}
export LD_LIBRARY_PATH=${SSL}/lib
# needed if you need to start from scratch otherwise the CA.pl -newca
command doesn't copy the new
# private key into the CA directories
rm -rf demoCA
echo
"*********************************************************************************"
echo "Creating self-signed private key and certificate"
echo "When prompted override the default value for the Common Name field"
echo
"*********************************************************************************"
echo
# Generate a new self-signed certificate.
# After invocation, newreq.pem will contain a private key and certificate
# newreq.pem will be used in the next step
openssl req -new -x509 -keyout newreq.pem -out newreq.pem -passin
pass:whatever -passout pass:whatever
echo
"*********************************************************************************"
echo "Creating a new CA hierarchy (used later by the "ca" command) with
the certificate"
echo "and private key created in the last step"
echo
"*********************************************************************************"
echo
echo "newreq.pem" | CA.pl -newca >/dev/null
echo
"*********************************************************************************"
echo "Creating ROOT CA"
echo
"*********************************************************************************"
echo
# Create a PKCS#12 file, using the previously created CA certificate/key
# The certificate in demoCA/cacert.pem is the same as in newreq.pem.
Instead of
# using "-in demoCA/cacert.pem" we could have used "-in newreq.pem" and
then omitted
# the "-inkey newreq.pem" because newreq.pem contains both the private
key and certificate
openssl pkcs12 -export -in demoCA/cacert.pem -inkey newreq.pem -out
root.p12 -cacerts -passin pass:whatever -passout pass:whatever
# parse the PKCS#12 file just created and produce a PEM format
certificate and key in root.pem
openssl pkcs12 -in root.p12 -out root.pem -passin pass:whatever -passout
pass:whatever
# Convert root certificate from PEM format to DER format
openssl x509 -inform PEM -outform DER -in root.pem -out root.der
#Clean Up
rm -rf newreq.pem
---snipsnip---

This script creates my 'root.der' file, which I store on the wifi clients.
Post by Artur Hecker
Post by Thomas Maenner
I have the second box, with software up and running.
- My first attempt - just copying them - didn't work. OK, just a try.
why? what exactly did you copy and what exactly did you certify?
Post by Thomas Maenner
- Second, since the certs are tied to hostname, I recreated them -
guess what...
well, you have to look at what you are doing. are you sure that your
certificates are tied to the host address? because mine are not. and i
doubt that this is verified anyway. the server simply has a pair of
keys and both are signed and one of them (the private) is encrypted.
the posession of the decryption key enables the usage.
AFAIK I have three types of certs, which I need:
filename location script-file
root.pem radius-server:/etc/1x CA.root
root.der user-host #created above - derived
server.pem radius-server:/etc/1x CA.svr <radius-server>
user.p12 user-host CA.clt <username>

So, server.pem has the hostname "in it"...

Rather than fixing the way I did it... what about showing me the right
way to do it
Copying / modifying / creating the appropriate certs for a backup radius
server.
Post by Artur Hecker
ciao
artur
As you can see, I am a bit lost there...
Thanks a lot for your help!

Tom
--
Thomas Maenner
E-Mail: mailto:***@aehr.com





-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thomas Maenner
2003-03-21 18:58:25 UTC
Permalink
Thanks Artur,

hopefully, you can help me with a couple of things here:

When the 'root' certificate runs out, what should / can I do?
- it looks like I can not extend it's lifetime?
- will a re-creation invalid the client certificates? Does a
distribution of the root.der file have to be "safe"?

Thanks everybody for your advise!

Tom
Post by Artur Hecker
hi
Post by Thomas Maenner
Thanks to the EAP/TLS Howto, I was able to setup the radius server
and get all the authentification I needed going.
Now the script, which creates the root certificate, generates
root.pem with a lifetime of 30 days.
After that authentification doesn't work, OK. Last month I recreated
everything. That's a pain...
- How can I extend them? Reuse them? What's the deal?
no reuse. you have to set another expriration date. take a look at the
scripts.
Post by Thomas Maenner
I have the second box, with software up and running.
- My first attempt - just copying them - didn't work. OK, just a try.
why? what exactly did you copy and what exactly did you certify?
Post by Thomas Maenner
- Second, since the certs are tied to hostname, I recreated them -
guess what...
well, you have to look at what you are doing. are you sure that your
certificates are tied to the host address? because mine are not. and i
doubt that this is verified anyway. the server simply has a pair of
keys and both are signed and one of them (the private) is encrypted.
the posession of the decryption key enables the usage.
ciao
artur
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Thomas Maenner
2003-03-21 23:42:41 UTC
Permalink
Hi,

you were so right... and I am so blind...
Post by Artur Hecker
hi
Post by Thomas Maenner
Thanks to the EAP/TLS Howto, I was able to setup the radius server
and get all the authentification I needed going.
Now the script, which creates the root certificate, generates
root.pem with a lifetime of 30 days.
After that authentification doesn't work, OK. Last month I recreated
everything. That's a pain...
- How can I extend them? Reuse them? What's the deal?
no reuse. you have to set another expriration date. take a look at the
scripts.
Just changed the openssl req call in my CA.root script into:

---snipsnip---
openssl req -new -x509 -keyout newreq.pem -out newreq.pem -passin
pass:xxx -passout pass:xxx-days 3650
---snipsnip---

Seems to work now.

Thanks for your help!

Tom



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Loading...