summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-25 13:47:32 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-25 13:47:32 +0100
commit2a63266bbde8da4f2b1be4a395ec0e3910cc5799 (patch)
tree5c5b8d5dd2850697634f46c7d1dc9a6de0d3360c /lib
parentbf225e1ca01f31f3fd4fba4cc792510ba9684ccb (diff)
Add tests/demoCA and use certs and key in there for the examples.
Diffstat (limited to 'lib')
-rw-r--r--lib/examples/client.conf7
-rw-r--r--lib/tests/demoCA/index.txt2
-rw-r--r--lib/tests/demoCA/index.txt.attr1
-rw-r--r--lib/tests/demoCA/newcerts/01.pem52
-rw-r--r--lib/tests/demoCA/newcerts/02.pem50
-rw-r--r--lib/tests/demoCA/private/c1key.pem9
-rw-r--r--lib/tests/demoCA/private/cakey.pem9
-rw-r--r--lib/tests/demoCA/serial1
8 files changed, 127 insertions, 4 deletions
diff --git a/lib/examples/client.conf b/lib/examples/client.conf
index c9500e8..64a70b6 100644
--- a/lib/examples/client.conf
+++ b/lib/examples/client.conf
@@ -15,10 +15,9 @@ realm blocking-tls {
type = "TLS"
timeout = 1
retries = 3
- cacertfile = "/home/linus/nordberg-ca.crt"
- #cacertfile = "/home/linus/p/moonshot/demoCA/cacert.pem"
- certfile = "/home/linus/p/moonshot/radsecproxy-test.crt"
- certkeyfile = "/home/linus/p/moonshot/radsecproxy-test.key"
+ cacertfile = "tests/demoCA/newcerts/01.pem"
+ certfile = "tests/demoCA/newcerts/02.pem"
+ certkeyfile = "tests/demoCA/private/c1key.pem"
server {
hostname = "localhost"
service = "2083"
diff --git a/lib/tests/demoCA/index.txt b/lib/tests/demoCA/index.txt
new file mode 100644
index 0000000..5ac5f59
--- /dev/null
+++ b/lib/tests/demoCA/index.txt
@@ -0,0 +1,2 @@
+V 240216122242Z 01 unknown /C=SE/ST=Bogus State/O=Bogus Ltd/OU=Bogus/CN=My Bogus CA for testing libradsec
+V 240216123520Z 02 unknown /C=SE/ST=Bogus State/O=Bogus Ltd/OU=Bogus/CN=My Bogus Certificate for testing libradsec
diff --git a/lib/tests/demoCA/index.txt.attr b/lib/tests/demoCA/index.txt.attr
new file mode 100644
index 0000000..8f7e63a
--- /dev/null
+++ b/lib/tests/demoCA/index.txt.attr
@@ -0,0 +1 @@
+unique_subject = yes
diff --git a/lib/tests/demoCA/newcerts/01.pem b/lib/tests/demoCA/newcerts/01.pem
new file mode 100644
index 0000000..79fa539
--- /dev/null
+++ b/lib/tests/demoCA/newcerts/01.pem
@@ -0,0 +1,52 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 1 (0x1)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: C=SE, ST=Bogus State, O=Bogus Ltd, OU=Bogus, CN=My Bogus CA for testing libradsec
+ Validity
+ Not Before: Mar 25 12:22:42 2011 GMT
+ Not After : Feb 16 12:22:42 2024 GMT
+ Subject: C=SE, ST=Bogus State, O=Bogus Ltd, OU=Bogus, CN=My Bogus CA for testing libradsec
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public Key: (512 bit)
+ Modulus (512 bit):
+ 00:aa:27:7d:3b:29:12:1e:39:8d:9f:43:ad:ae:83:
+ 6f:22:88:08:07:92:b9:1d:d4:88:5f:58:b9:76:ec:
+ 4a:e9:c9:6a:73:ed:70:66:5e:6f:dc:02:15:9f:dd:
+ 7a:5f:cc:3b:98:8a:27:b1:f5:98:fb:6b:c7:ab:5e:
+ 5e:ea:3c:c4:5f
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Subject Key Identifier:
+ 5A:9B:BA:E8:A6:9B:E9:78:73:1E:0B:83:00:49:94:46:13:9C:1C:89
+ X509v3 Authority Key Identifier:
+ keyid:5A:9B:BA:E8:A6:9B:E9:78:73:1E:0B:83:00:49:94:46:13:9C:1C:89
+ DirName:/C=SE/ST=Bogus State/O=Bogus Ltd/OU=Bogus/CN=My Bogus CA for testing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pbmcg
+bGlicmFkc2VjggEBMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADQQAYoiGS
+pirgpE1XwImUXLAmZPixDJf4zdWvyDg+o2hHguGmLmOXTcB59Zr/OGcQ1iJhRImE
+UIXuOIdtTwYQNjM5
+-----END CERTIFICATE-----
diff --git a/lib/tests/demoCA/newcerts/02.pem b/lib/tests/demoCA/newcerts/02.pem
new file mode 100644
index 0000000..4345003
--- /dev/null
+++ b/lib/tests/demoCA/newcerts/02.pem
@@ -0,0 +1,50 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number: 2 (0x2)
+ Signature Algorithm: sha1WithRSAEncryption
+ Issuer: C=SE, ST=Bogus State, O=Bogus Ltd, OU=Bogus, CN=My Bogus CA for testing libradsec
+ Validity
+ Not Before: Mar 25 12:35:20 2011 GMT
+ Not After : Feb 16 12:35:20 2024 GMT
+ Subject: C=SE, ST=Bogus State, O=Bogus Ltd, OU=Bogus, CN=My Bogus Certificate for testing libradsec
+ Subject Public Key Info:
+ Public Key Algorithm: rsaEncryption
+ RSA Public Key: (512 bit)
+ Modulus (512 bit):
+ 00:c3:e5:16:74:47:84:bb:26:bc:50:fe:dc:b5:70:
+ 21:ad:21:b6:ff:cb:ac:b2:24:9e:08:75:39:5d:ba:
+ f4:b1:59:f6:a8:14:02:62:c3:68:6d:f2:08:9b:fe:
+ 66:5c:72:92:16:04:60:b5:08:83:66:28:3b:46:f0:
+ cf:95:37:b7:d7
+ Exponent: 65537 (0x10001)
+ X509v3 extensions:
+ X509v3 Basic Constraints:
+ CA:FALSE
+ Netscape Comment:
+ OpenSSL Generated Certificate
+ X509v3 Subject Key Identifier:
+ 89:23:42:95:2B:52:A4:77:FC:5E:59:CA:8D:E0:30:AF:D3:B5:C3:C2
+ X509v3 Authority Key Identifier:
+ keyid:5A:9B:BA:E8:A6:9B:E9:78:73:1E:0B:83:00:49:94:46:13:9C:1C:89
+
+ Signature Algorithm: sha1WithRSAEncryption
+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ATE-----
diff --git a/lib/tests/demoCA/private/c1key.pem b/lib/tests/demoCA/private/c1key.pem
new file mode 100644
index 0000000..6b0c1ee
--- /dev/null
+++ b/lib/tests/demoCA/private/c1key.pem
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOQIBAAJBAMPlFnRHhLsmvFD+3LVwIa0htv/LrLIkngh1OV269LFZ9qgUAmLD
+aG3yCJv+ZlxykhYEYLUIg2YoO0bwz5U3t9cCAwEAAQJAZtVEg0fj2mbMJmyTqb8y
+PnNbYE4n2uA0AVagBZ8Vwl7+rV84tSxXqfZt+G+I9iIwdGZzw9PKEgITX802MTjx
+cQIhAPJmBKucvt8d/a9BjvWaOT51anzWBiG+2FJ3dsM9t1+vAiEAzuMPCITPXNlL
+1frMDuqqcY8XuEN4Drru/Bs/ChlIzFkCIQDuge1Ugt3YoiTsniAxj7eFuni2Ls1H
+xQYLVtr3zzEwpwIfTMX1zjN6v/njKoTnNKHgnkN7ieV/p/e2t9dkjVrUqQIgYzK1
+atYmygSrgsaPkwpYXNVrNBJmBDJpd68pb59wM2Y=
+-----END RSA PRIVATE KEY-----
diff --git a/lib/tests/demoCA/private/cakey.pem b/lib/tests/demoCA/private/cakey.pem
new file mode 100644
index 0000000..6c60bc7
--- /dev/null
+++ b/lib/tests/demoCA/private/cakey.pem
@@ -0,0 +1,9 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOwIBAAJBAKonfTspEh45jZ9Dra6DbyKICAeSuR3UiF9YuXbsSunJanPtcGZe
+b9wCFZ/del/MO5iKJ7H1mPtrx6teXuo8xF8CAwEAAQJASypsqPDIvy9ff6avF/OZ
+6aA8I9ROEH5ty+ju7TkPEt0dgtcA20m20FtbkKuv1ymEAQk2DbfibWgVfu8NtXia
+gQIhAN04azjSAO94wlahTblo9NOe3Sl9VoSju/P2vPZhMbufAiEAxOfIdv7eUYxW
+tfdF58H6R5SKt/PJ3f5ofIAcIMqQP0ECIGTacdeHtjF2xnKkO0EKHoPT61Qc9jKm
+SuvgUymoCfpVAiEAigtdlV9ViaJz4Bq9nZ920dwn7JMzwTjtE+vUzIB25IECIQC4
+Hp8D00gBVlUgW0OlpmA3PWa3TfkEL3pghZqgeYZzXA==
+-----END RSA PRIVATE KEY-----
diff --git a/lib/tests/demoCA/serial b/lib/tests/demoCA/serial
new file mode 100644
index 0000000..75016ea
--- /dev/null
+++ b/lib/tests/demoCA/serial
@@ -0,0 +1 @@
+03