diff options
author | ryker <> | 1998-10-05 20:13:14 +0000 |
---|---|---|
committer | ryker <> | 1998-10-05 20:13:14 +0000 |
commit | fe5d0717e2760d02faf23bf5a714f17b33ae4abb (patch) | |
tree | 8d4ad346f10a36bdd90b503d222bda6b4ecd0037 /src/lib/libssl/test | |
parent | 75bf5ead4149b2b67781def7ace1ec720ae1753e (diff) | |
parent | aeeae06a79815dc190061534d47236cec09f9e32 (diff) | |
download | openbsd-fe5d0717e2760d02faf23bf5a714f17b33ae4abb.tar.gz openbsd-fe5d0717e2760d02faf23bf5a714f17b33ae4abb.tar.bz2 openbsd-fe5d0717e2760d02faf23bf5a714f17b33ae4abb.zip |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libssl/test')
33 files changed, 1506 insertions, 0 deletions
diff --git a/src/lib/libssl/test/CAss.cnf b/src/lib/libssl/test/CAss.cnf new file mode 100644 index 0000000000..b941b7ae15 --- /dev/null +++ b/src/lib/libssl/test/CAss.cnf | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | |||
6 | RANDFILE = ./.rnd | ||
7 | |||
8 | #################################################################### | ||
9 | [ req ] | ||
10 | default_bits = 512 | ||
11 | default_keyfile = keySS.pem | ||
12 | distinguished_name = req_distinguished_name | ||
13 | encrypt_rsa_key = no | ||
14 | default_md = sha1 | ||
15 | |||
16 | [ req_distinguished_name ] | ||
17 | countryName = Country Name (2 letter code) | ||
18 | countryName_default = AU | ||
19 | countryName_value = AU | ||
20 | |||
21 | organizationName = Organization Name (eg, company) | ||
22 | organizationName_value = Dodgy Brothers | ||
23 | |||
24 | commonName = Common Name (eg, YOUR name) | ||
25 | commonName_value = Dodgy CA | ||
diff --git a/src/lib/libssl/test/CAssdh.cnf b/src/lib/libssl/test/CAssdh.cnf new file mode 100644 index 0000000000..4e0a908679 --- /dev/null +++ b/src/lib/libssl/test/CAssdh.cnf | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | # hacked by iang to do DH certs - CA | ||
6 | |||
7 | RANDFILE = ./.rnd | ||
8 | |||
9 | #################################################################### | ||
10 | [ req ] | ||
11 | distinguished_name = req_distinguished_name | ||
12 | encrypt_rsa_key = no | ||
13 | |||
14 | [ req_distinguished_name ] | ||
15 | countryName = Country Name (2 letter code) | ||
16 | countryName_default = CU | ||
17 | countryName_value = CU | ||
18 | |||
19 | organizationName = Organization Name (eg, company) | ||
20 | organizationName_value = La Junta de la Revolucion | ||
21 | |||
22 | commonName = Common Name (eg, YOUR name) | ||
23 | commonName_value = Junta | ||
24 | |||
diff --git a/src/lib/libssl/test/CAssdsa.cnf b/src/lib/libssl/test/CAssdsa.cnf new file mode 100644 index 0000000000..a6b4d1810c --- /dev/null +++ b/src/lib/libssl/test/CAssdsa.cnf | |||
@@ -0,0 +1,23 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | # hacked by iang to do DSA certs - CA | ||
6 | |||
7 | RANDFILE = ./.rnd | ||
8 | |||
9 | #################################################################### | ||
10 | [ req ] | ||
11 | distinguished_name = req_distinguished_name | ||
12 | encrypt_rsa_key = no | ||
13 | |||
14 | [ req_distinguished_name ] | ||
15 | countryName = Country Name (2 letter code) | ||
16 | countryName_default = ES | ||
17 | countryName_value = ES | ||
18 | |||
19 | organizationName = Organization Name (eg, company) | ||
20 | organizationName_value = Hermanos Locos | ||
21 | |||
22 | commonName = Common Name (eg, YOUR name) | ||
23 | commonName_value = Hermanos Locos CA | ||
diff --git a/src/lib/libssl/test/CAssrsa.cnf b/src/lib/libssl/test/CAssrsa.cnf new file mode 100644 index 0000000000..eb24a6dfc0 --- /dev/null +++ b/src/lib/libssl/test/CAssrsa.cnf | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | # create RSA certs - CA | ||
6 | |||
7 | RANDFILE = ./.rnd | ||
8 | |||
9 | #################################################################### | ||
10 | [ req ] | ||
11 | distinguished_name = req_distinguished_name | ||
12 | encrypt_key = no | ||
13 | |||
14 | [ req_distinguished_name ] | ||
15 | countryName = Country Name (2 letter code) | ||
16 | countryName_default = ES | ||
17 | countryName_value = ES | ||
18 | |||
19 | organizationName = Organization Name (eg, company) | ||
20 | organizationName_value = Hermanos Locos | ||
21 | |||
22 | commonName = Common Name (eg, YOUR name) | ||
23 | commonName_value = Hermanos Locos CA | ||
24 | |||
diff --git a/src/lib/libssl/test/Sssdsa.cnf b/src/lib/libssl/test/Sssdsa.cnf new file mode 100644 index 0000000000..8e170a28ef --- /dev/null +++ b/src/lib/libssl/test/Sssdsa.cnf | |||
@@ -0,0 +1,27 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | # hacked by iang to do DSA certs - Server | ||
6 | |||
7 | RANDFILE = ./.rnd | ||
8 | |||
9 | #################################################################### | ||
10 | [ req ] | ||
11 | distinguished_name = req_distinguished_name | ||
12 | encrypt_rsa_key = no | ||
13 | |||
14 | [ req_distinguished_name ] | ||
15 | countryName = Country Name (2 letter code) | ||
16 | countryName_default = ES | ||
17 | countryName_value = ES | ||
18 | |||
19 | organizationName = Organization Name (eg, company) | ||
20 | organizationName_value = Tortilleras S.A. | ||
21 | |||
22 | 0.commonName = Common Name (eg, YOUR name) | ||
23 | 0.commonName_value = Torti | ||
24 | |||
25 | 1.commonName = Common Name (eg, YOUR name) | ||
26 | 1.commonName_value = Gordita | ||
27 | |||
diff --git a/src/lib/libssl/test/Sssrsa.cnf b/src/lib/libssl/test/Sssrsa.cnf new file mode 100644 index 0000000000..8c79a03fca --- /dev/null +++ b/src/lib/libssl/test/Sssrsa.cnf | |||
@@ -0,0 +1,26 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | # create RSA certs - Server | ||
6 | |||
7 | RANDFILE = ./.rnd | ||
8 | |||
9 | #################################################################### | ||
10 | [ req ] | ||
11 | distinguished_name = req_distinguished_name | ||
12 | encrypt_key = no | ||
13 | |||
14 | [ req_distinguished_name ] | ||
15 | countryName = Country Name (2 letter code) | ||
16 | countryName_default = ES | ||
17 | countryName_value = ES | ||
18 | |||
19 | organizationName = Organization Name (eg, company) | ||
20 | organizationName_value = Tortilleras S.A. | ||
21 | |||
22 | 0.commonName = Common Name (eg, YOUR name) | ||
23 | 0.commonName_value = Torti | ||
24 | |||
25 | 1.commonName = Common Name (eg, YOUR name) | ||
26 | 1.commonName_value = Gordita | ||
diff --git a/src/lib/libssl/test/Uss.cnf b/src/lib/libssl/test/Uss.cnf new file mode 100644 index 0000000000..c89692d519 --- /dev/null +++ b/src/lib/libssl/test/Uss.cnf | |||
@@ -0,0 +1,28 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | |||
6 | RANDFILE = ./.rnd | ||
7 | |||
8 | #################################################################### | ||
9 | [ req ] | ||
10 | default_bits = 512 | ||
11 | default_keyfile = keySS.pem | ||
12 | distinguished_name = req_distinguished_name | ||
13 | encrypt_rsa_key = no | ||
14 | default_md = md2 | ||
15 | |||
16 | [ req_distinguished_name ] | ||
17 | countryName = Country Name (2 letter code) | ||
18 | countryName_default = AU | ||
19 | countryName_value = AU | ||
20 | |||
21 | organizationName = Organization Name (eg, company) | ||
22 | organizationName_value = Dodgy Brothers | ||
23 | |||
24 | 0.commonName = Common Name (eg, YOUR name) | ||
25 | 0.commonName_value = Brother 1 | ||
26 | |||
27 | 1.commonName = Common Name (eg, YOUR name) | ||
28 | 1.commonName_value = Brother 2 | ||
diff --git a/src/lib/libssl/test/methtest.c b/src/lib/libssl/test/methtest.c new file mode 100644 index 0000000000..630d29dc91 --- /dev/null +++ b/src/lib/libssl/test/methtest.c | |||
@@ -0,0 +1,105 @@ | |||
1 | /* test/methtest.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include <stdlib.h> | ||
61 | #include "rsa.h" | ||
62 | #include "x509.h" | ||
63 | #include "meth.h" | ||
64 | #include "err.h" | ||
65 | |||
66 | int main(argc,argv) | ||
67 | int argc; | ||
68 | char *argv[]; | ||
69 | { | ||
70 | METHOD_CTX *top,*tmp1,*tmp2; | ||
71 | |||
72 | top=METH_new(x509_lookup()); /* get a top level context */ | ||
73 | if (top == NULL) goto err; | ||
74 | |||
75 | tmp1=METH_new(x509_by_file()); | ||
76 | if (top == NULL) goto err; | ||
77 | METH_arg(tmp1,METH_TYPE_FILE,"cafile1"); | ||
78 | METH_arg(tmp1,METH_TYPE_FILE,"cafile2"); | ||
79 | METH_push(top,METH_X509_CA_BY_SUBJECT,tmp1); | ||
80 | |||
81 | tmp2=METH_new(x509_by_dir()); | ||
82 | METH_arg(tmp2,METH_TYPE_DIR,"/home/eay/.CAcerts"); | ||
83 | METH_arg(tmp2,METH_TYPE_DIR,"/home/eay/SSLeay/certs"); | ||
84 | METH_arg(tmp2,METH_TYPE_DIR,"/usr/local/ssl/certs"); | ||
85 | METH_push(top,METH_X509_CA_BY_SUBJECT,tmp2); | ||
86 | |||
87 | /* tmp=METH_new(x509_by_issuer_dir); | ||
88 | METH_arg(tmp,METH_TYPE_DIR,"/home/eay/.mycerts"); | ||
89 | METH_push(top,METH_X509_BY_ISSUER,tmp); | ||
90 | |||
91 | tmp=METH_new(x509_by_issuer_primary); | ||
92 | METH_arg(tmp,METH_TYPE_FILE,"/home/eay/.mycerts/primary.pem"); | ||
93 | METH_push(top,METH_X509_BY_ISSUER,tmp); | ||
94 | */ | ||
95 | |||
96 | METH_init(top); | ||
97 | METH_control(tmp1,METH_CONTROL_DUMP,stdout); | ||
98 | METH_control(tmp2,METH_CONTROL_DUMP,stdout); | ||
99 | exit(0); | ||
100 | err: | ||
101 | ERR_load_crypto_strings(); | ||
102 | ERR_print_errors_fp(stderr); | ||
103 | exit(1); | ||
104 | return(0); | ||
105 | } | ||
diff --git a/src/lib/libssl/test/pkcs7-1.pem b/src/lib/libssl/test/pkcs7-1.pem new file mode 100644 index 0000000000..c47b27af88 --- /dev/null +++ b/src/lib/libssl/test/pkcs7-1.pem | |||
@@ -0,0 +1,15 @@ | |||
1 | -----BEGIN PKCS7----- | ||
2 | MIICUAYJKoZIhvcNAQcCoIICQTCCAj0CAQExDjAMBggqhkiG9w0CAgUAMCgGCSqG | ||
3 | SIb3DQEHAaAbBBlFdmVyeW9uZSBnZXRzIEZyaWRheSBvZmYuoIIBXjCCAVowggEE | ||
4 | AgQUAAApMA0GCSqGSIb3DQEBAgUAMCwxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRF | ||
5 | eGFtcGxlIE9yZ2FuaXphdGlvbjAeFw05MjA5MDkyMjE4MDZaFw05NDA5MDkyMjE4 | ||
6 | MDVaMEIxCzAJBgNVBAYTAlVTMR0wGwYDVQQKExRFeGFtcGxlIE9yZ2FuaXphdGlv | ||
7 | bjEUMBIGA1UEAxMLVGVzdCBVc2VyIDEwWzANBgkqhkiG9w0BAQEFAANKADBHAkAK | ||
8 | ZnkdxpiBaN56t3QZu3+wwAHGJxAnAHUUKULhmo2MUdBTs+N4Kh3l3Fr06+mUaBcB | ||
9 | FKHf5nzcmpr1XWVWILurAgMBAAEwDQYJKoZIhvcNAQECBQADQQBFGqHhqncgSl/N | ||
10 | 9XYGnQL3MsJvNnsNV4puZPOakR9Hld8JlDQFEaDR30ogsmp3TMrvdfxpLlTCoZN8 | ||
11 | BxEmnZsWMYGbMIGYAgEBMDQwLDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFEV4YW1w | ||
12 | bGUgT3JnYW5pemF0aW9uAgQUAAApMAwGCCqGSIb3DQICBQAwDQYJKoZIhvcNAQEB | ||
13 | BQAEQAX6aoEvx9+L9PJUJQngPoRuEbnGIL4gCe+0QO+8xmkhaZSsBPNBtX0FIC1C | ||
14 | j7Kie1x339mxW/w9VZNTUDQQweHh | ||
15 | -----END PKCS7----- | ||
diff --git a/src/lib/libssl/test/pkcs7.pem b/src/lib/libssl/test/pkcs7.pem new file mode 100644 index 0000000000..d55c60b94e --- /dev/null +++ b/src/lib/libssl/test/pkcs7.pem | |||
@@ -0,0 +1,54 @@ | |||
1 | MIAGCSqGSIb3DQEHAqCAMIACAQExADCABgkqhkiG9w0BBwEAAKCAMIIE+DCCBGGg | ||
2 | AwIBAgIQaGSF/JpbS1C223+yrc+N1DANBgkqhkiG9w0BAQQFADBiMREwDwYDVQQH | ||
3 | EwhJbnRlcm5ldDEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xNDAyBgNV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NVBAYTAlVTMRcwFQYDVQQKEw5W | ||
49 | ZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJpbWFyeSBD | ||
50 | ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eRcNOTYwNzE2MjMxMTI5WhcNOTYwODE1MDAw | ||
51 | MDAwWjANBgkqhkiG9w0BAQIFAAOBgQAXsLE4vnsY6sY67QrmWec7iaU2ehzxanEK | ||
52 | /9wKHZNuhlNzk+qGZZw2evxfUe2OaRbYpl8zuZvhK9BHD3ad14OSe9/zx5hOPgP/ | ||
53 | DQXt6R4R8Q/1JheBrolrgbavjvI2wKS8/Psp2prBrkF4T48+AKRmS8Zzh1guxgvP | ||
54 | b+xSu/jH0gAAMYAAAAAAAAAAAA== | ||
diff --git a/src/lib/libssl/test/r160test.c b/src/lib/libssl/test/r160test.c new file mode 100644 index 0000000000..a172e393ca --- /dev/null +++ b/src/lib/libssl/test/r160test.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* test/r160test.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
diff --git a/src/lib/libssl/test/tcrl b/src/lib/libssl/test/tcrl new file mode 100644 index 0000000000..859fba452f --- /dev/null +++ b/src/lib/libssl/test/tcrl | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay crl' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testcrl.pem | ||
12 | fi | ||
13 | |||
14 | echo testing crl conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | #echo "p -> t" | ||
21 | #$cmd -in fff.p -inform p -outform t >f.t | ||
22 | #if [ $? != 0 ]; then exit 1; fi | ||
23 | echo "p -> p" | ||
24 | $cmd -in fff.p -inform p -outform p >f.p | ||
25 | if [ $? != 0 ]; then exit 1; fi | ||
26 | |||
27 | echo "d -> d" | ||
28 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | #echo "t -> d" | ||
31 | #$cmd -in f.t -inform t -outform d >ff.d2 | ||
32 | #if [ $? != 0 ]; then exit 1; fi | ||
33 | echo "p -> d" | ||
34 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
35 | if [ $? != 0 ]; then exit 1; fi | ||
36 | |||
37 | #echo "d -> t" | ||
38 | #$cmd -in f.d -inform d -outform t >ff.t1 | ||
39 | #if [ $? != 0 ]; then exit 1; fi | ||
40 | #echo "t -> t" | ||
41 | #$cmd -in f.t -inform t -outform t >ff.t2 | ||
42 | #if [ $? != 0 ]; then exit 1; fi | ||
43 | #echo "p -> t" | ||
44 | #$cmd -in f.p -inform p -outform t >ff.t3 | ||
45 | #if [ $? != 0 ]; then exit 1; fi | ||
46 | |||
47 | echo "d -> p" | ||
48 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
49 | if [ $? != 0 ]; then exit 1; fi | ||
50 | #echo "t -> p" | ||
51 | #$cmd -in f.t -inform t -outform p >ff.p2 | ||
52 | #if [ $? != 0 ]; then exit 1; fi | ||
53 | echo "p -> p" | ||
54 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
55 | if [ $? != 0 ]; then exit 1; fi | ||
56 | |||
57 | cmp fff.p f.p | ||
58 | if [ $? != 0 ]; then exit 1; fi | ||
59 | cmp fff.p ff.p1 | ||
60 | if [ $? != 0 ]; then exit 1; fi | ||
61 | #cmp fff.p ff.p2 | ||
62 | #if [ $? != 0 ]; then exit 1; fi | ||
63 | cmp fff.p ff.p3 | ||
64 | if [ $? != 0 ]; then exit 1; fi | ||
65 | |||
66 | #cmp f.t ff.t1 | ||
67 | #if [ $? != 0 ]; then exit 1; fi | ||
68 | #cmp f.t ff.t2 | ||
69 | #if [ $? != 0 ]; then exit 1; fi | ||
70 | #cmp f.t ff.t3 | ||
71 | #if [ $? != 0 ]; then exit 1; fi | ||
72 | |||
73 | cmp f.p ff.p1 | ||
74 | if [ $? != 0 ]; then exit 1; fi | ||
75 | #cmp f.p ff.p2 | ||
76 | #if [ $? != 0 ]; then exit 1; fi | ||
77 | cmp f.p ff.p3 | ||
78 | if [ $? != 0 ]; then exit 1; fi | ||
79 | |||
80 | /bin/rm -f f.* ff.* fff.* | ||
81 | exit 0 | ||
diff --git a/src/lib/libssl/test/test.cnf b/src/lib/libssl/test/test.cnf new file mode 100644 index 0000000000..faad3914a8 --- /dev/null +++ b/src/lib/libssl/test/test.cnf | |||
@@ -0,0 +1,88 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | |||
6 | RANDFILE = ./.rnd | ||
7 | |||
8 | #################################################################### | ||
9 | [ ca ] | ||
10 | default_ca = CA_default # The default ca section | ||
11 | |||
12 | #################################################################### | ||
13 | [ CA_default ] | ||
14 | |||
15 | dir = ./demoCA # Where everything is kept | ||
16 | certs = $dir/certs # Where the issued certs are kept | ||
17 | crl_dir = $dir/crl # Where the issued crl are kept | ||
18 | database = $dir/index.txt # database index file. | ||
19 | new_certs_dir = $dir/new_certs # default place for new certs. | ||
20 | |||
21 | certificate = $dir/CAcert.pem # The CA certificate | ||
22 | serial = $dir/serial # The current serial number | ||
23 | crl = $dir/crl.pem # The current CRL | ||
24 | private_key = $dir/private/CAkey.pem# The private key | ||
25 | RANDFILE = $dir/private/.rand # private random number file | ||
26 | |||
27 | default_days = 365 # how long to certify for | ||
28 | default_crl_days= 30 # how long before next CRL | ||
29 | default_md = md5 # which md to use. | ||
30 | |||
31 | # A few difference way of specifying how similar the request should look | ||
32 | # For type CA, the listed attributes must be the same, and the optional | ||
33 | # and supplied fields are just that :-) | ||
34 | policy = policy_match | ||
35 | |||
36 | # For the CA policy | ||
37 | [ policy_match ] | ||
38 | countryName = match | ||
39 | stateOrProvinceName = match | ||
40 | organizationName = match | ||
41 | organizationalUnitName = optional | ||
42 | commonName = supplied | ||
43 | emailAddress = optional | ||
44 | |||
45 | # For the 'anything' policy | ||
46 | # At this point in time, you must list all acceptable 'object' | ||
47 | # types. | ||
48 | [ policy_anything ] | ||
49 | countryName = optional | ||
50 | stateOrProvinceName = optional | ||
51 | localityName = optional | ||
52 | organizationName = optional | ||
53 | organizationalUnitName = optional | ||
54 | commonName = supplied | ||
55 | emailAddress = optional | ||
56 | |||
57 | #################################################################### | ||
58 | [ req ] | ||
59 | default_bits = 512 | ||
60 | default_keyfile = testkey.pem | ||
61 | distinguished_name = req_distinguished_name | ||
62 | encrypt_rsa_key = no | ||
63 | |||
64 | [ req_distinguished_name ] | ||
65 | countryName = Country Name (2 letter code) | ||
66 | countryName_default = AU | ||
67 | countryName_value = AU | ||
68 | |||
69 | stateOrProvinceName = State or Province Name (full name) | ||
70 | stateOrProvinceName_default = Queensland | ||
71 | stateOrProvinceName_value = | ||
72 | |||
73 | localityName = Locality Name (eg, city) | ||
74 | localityName_value = Brisbane | ||
75 | |||
76 | organizationName = Organization Name (eg, company) | ||
77 | organizationName_default = | ||
78 | organizationName_value = CryptSoft Pty Ltd | ||
79 | |||
80 | organizationalUnitName = Organizational Unit Name (eg, section) | ||
81 | organizationalUnitName_default = | ||
82 | organizationalUnitName_value = . | ||
83 | |||
84 | commonName = Common Name (eg, YOUR name) | ||
85 | commonName_value = Eric Young | ||
86 | |||
87 | emailAddress = Email Address | ||
88 | emailAddress_value = eay@mincom.oz.au | ||
diff --git a/src/lib/libssl/test/testca b/src/lib/libssl/test/testca new file mode 100644 index 0000000000..a28402f9ca --- /dev/null +++ b/src/lib/libssl/test/testca | |||
@@ -0,0 +1,44 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | SH="/bin/sh" | ||
4 | PATH=../apps:$PATH | ||
5 | export SH PATH | ||
6 | |||
7 | SSLEAY_CONFIG="-config CAss.cnf" | ||
8 | export SSLEAY_CONFIG | ||
9 | |||
10 | /bin/rm -fr demoCA | ||
11 | $SH ../apps/CA.sh -newca <<EOF | ||
12 | EOF | ||
13 | |||
14 | if [ $? != 0 ]; then | ||
15 | exit 1; | ||
16 | fi | ||
17 | |||
18 | SSLEAY_CONFIG="-config Uss.cnf" | ||
19 | export SSLEAY_CONFIG | ||
20 | $SH ../apps/CA.sh -newreq | ||
21 | if [ $? != 0 ]; then | ||
22 | exit 1; | ||
23 | fi | ||
24 | |||
25 | |||
26 | SSLEAY_CONFIG="-config ../apps/ssleay.cnf" | ||
27 | export SSLEAY_CONFIG | ||
28 | $SH ../apps/CA.sh -sign <<EOF | ||
29 | y | ||
30 | y | ||
31 | EOF | ||
32 | if [ $? != 0 ]; then | ||
33 | exit 1; | ||
34 | fi | ||
35 | |||
36 | |||
37 | $SH ../apps/CA.sh -verify newcert.pem | ||
38 | if [ $? != 0 ]; then | ||
39 | exit 1; | ||
40 | fi | ||
41 | |||
42 | /bin/rm -fr demoCA newcert.pem newreq.pem | ||
43 | #usage: CA -newcert|-newreq|-newca|-sign|-verify | ||
44 | |||
diff --git a/src/lib/libssl/test/testcrl.pem b/src/lib/libssl/test/testcrl.pem new file mode 100644 index 0000000000..0989788354 --- /dev/null +++ b/src/lib/libssl/test/testcrl.pem | |||
@@ -0,0 +1,16 @@ | |||
1 | -----BEGIN X509 CRL----- | ||
2 | MIICjTCCAfowDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMxIDAeBgNVBAoT | ||
3 | F1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2VydmVy | ||
4 | IENlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05NTA1MDIwMjEyMjZaFw05NTA2MDEw | ||
5 | MDAxNDlaMIIBaDAWAgUCQQAABBcNOTUwMjAxMTcyNDI2WjAWAgUCQQAACRcNOTUw | ||
6 | MjEwMDIxNjM5WjAWAgUCQQAADxcNOTUwMjI0MDAxMjQ5WjAWAgUCQQAADBcNOTUw | ||
7 | MjI1MDA0NjQ0WjAWAgUCQQAAGxcNOTUwMzEzMTg0MDQ5WjAWAgUCQQAAFhcNOTUw | ||
8 | MzE1MTkxNjU0WjAWAgUCQQAAGhcNOTUwMzE1MTk0MDQxWjAWAgUCQQAAHxcNOTUw | ||
9 | MzI0MTk0NDMzWjAWAgUCcgAABRcNOTUwMzI5MjAwNzExWjAWAgUCcgAAERcNOTUw | ||
10 | MzMwMDIzNDI2WjAWAgUCQQAAIBcNOTUwNDA3MDExMzIxWjAWAgUCcgAAHhcNOTUw | ||
11 | NDA4MDAwMjU5WjAWAgUCcgAAQRcNOTUwNDI4MTcxNzI0WjAWAgUCcgAAOBcNOTUw | ||
12 | NDI4MTcyNzIxWjAWAgUCcgAATBcNOTUwNTAyMDIxMjI2WjANBgkqhkiG9w0BAQIF | ||
13 | AAN+AHqOEJXSDejYy0UwxxrH/9+N2z5xu/if0J6qQmK92W0hW158wpJg+ovV3+wQ | ||
14 | wvIEPRL2rocL0tKfAsVq1IawSJzSNgxG0lrcla3MrJBnZ4GaZDu4FutZh72MR3Gt | ||
15 | JaAL3iTJHJD55kK2D/VoyY1djlsPuNh6AEgdVwFAyp0v | ||
16 | -----END X509 CRL----- | ||
diff --git a/src/lib/libssl/test/testenc b/src/lib/libssl/test/testenc new file mode 100644 index 0000000000..42db56c2be --- /dev/null +++ b/src/lib/libssl/test/testenc | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | testsrc=Makefile.ssl | ||
4 | test=./p | ||
5 | cmd=../apps/ssleay | ||
6 | |||
7 | cat $testsrc >$test; | ||
8 | |||
9 | echo cat | ||
10 | $cmd enc < $test > $test.cipher | ||
11 | $cmd enc < $test.cipher >$test.clear | ||
12 | cmp $test $test.clear | ||
13 | if [ $? != 0 ] | ||
14 | then | ||
15 | exit 1 | ||
16 | else | ||
17 | /bin/rm $test.cipher $test.clear | ||
18 | fi | ||
19 | echo base64 | ||
20 | $cmd enc -a -e < $test > $test.cipher | ||
21 | $cmd enc -a -d < $test.cipher >$test.clear | ||
22 | cmp $test $test.clear | ||
23 | if [ $? != 0 ] | ||
24 | then | ||
25 | exit 1 | ||
26 | else | ||
27 | /bin/rm $test.cipher $test.clear | ||
28 | fi | ||
29 | |||
30 | for i in rc4 \ | ||
31 | des-cfb des-ede-cfb des-ede3-cfb \ | ||
32 | des-ofb des-ede-ofb des-ede3-ofb \ | ||
33 | des-ecb des-ede des-ede3 desx \ | ||
34 | des-cbc des-ede-cbc des-ede3-cbc \ | ||
35 | idea-ecb idea-cfb idea-ofb idea-cbc \ | ||
36 | rc2-ecb rc2-cfb rc2-ofb rc2-cbc \ | ||
37 | bf-ecb bf-cfb bf-ofb bf-cbc rc4 \ | ||
38 | cast5-ecb cast5-cfb cast5-ofb cast5-cbc | ||
39 | do | ||
40 | echo $i | ||
41 | $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher | ||
42 | $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear | ||
43 | cmp $test $test.$i.clear | ||
44 | if [ $? != 0 ] | ||
45 | then | ||
46 | exit 1 | ||
47 | else | ||
48 | /bin/rm $test.$i.cipher $test.$i.clear | ||
49 | fi | ||
50 | |||
51 | echo $i base64 | ||
52 | $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher | ||
53 | $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear | ||
54 | cmp $test $test.$i.clear | ||
55 | if [ $? != 0 ] | ||
56 | then | ||
57 | exit 1 | ||
58 | else | ||
59 | /bin/rm $test.$i.cipher $test.$i.clear | ||
60 | fi | ||
61 | done | ||
62 | rm -f $test | ||
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen new file mode 100644 index 0000000000..12a4ca4cea --- /dev/null +++ b/src/lib/libssl/test/testgen | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | T=testcert | ||
4 | KEY=512 | ||
5 | CA=../certs/testca.pem | ||
6 | |||
7 | /bin/rm -f $T.1 $T.2 $T.key | ||
8 | |||
9 | PATH=../apps:$PATH; | ||
10 | export PATH | ||
11 | |||
12 | echo "generating certificate request" | ||
13 | |||
14 | echo "There should be a 2 sequences of .'s and some +'s." | ||
15 | echo "There should not be more that at most 80 per line" | ||
16 | echo "This could take some time." | ||
17 | |||
18 | ../apps/ssleay req -config test.cnf -new -out testreq.pem | ||
19 | if [ $? != 0 ]; then | ||
20 | echo problems creating request | ||
21 | exit 1 | ||
22 | fi | ||
23 | |||
24 | ../apps/ssleay req -verify -in testreq.pem -noout | ||
25 | if [ $? != 0 ]; then | ||
26 | echo signature on req is wrong | ||
27 | exit 1 | ||
28 | fi | ||
29 | |||
30 | exit 0 | ||
diff --git a/src/lib/libssl/test/testp7.pem b/src/lib/libssl/test/testp7.pem new file mode 100644 index 0000000000..b3b6dba830 --- /dev/null +++ b/src/lib/libssl/test/testp7.pem | |||
@@ -0,0 +1,46 @@ | |||
1 | -----BEGIN PKCS7----- | ||
2 | MIAGCSqGSIb3DQEHAqCAMIIIBwIBATEAMIAGCSqGSIb3DQEHAQAAoIIGPDCCBHIw | ||
3 | ggQcoAMCAQICEHkvjiX1iVGQMenF9HgIjI8wDQYJKoZIhvcNAQEEBQAwYjERMA8G | ||
4 | A1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQL | ||
5 | EytWZXJpU2lnbiBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMB4X | ||
6 | DTk2MDcxOTAwMDAwMFoXDTk3MDMzMDIzNTk1OVowgdUxETAPBgNVBAcTCEludGVy | ||
7 | bmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24g | ||
8 | Q2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjEoMCYGA1UECxMfRGln | ||
9 | aXRhbCBJRCBDbGFzcyAxIC0gU01JTUUgVGVzdDFHMEUGA1UECxM+d3d3LnZlcmlz | ||
10 | aWduLmNvbS9yZXBvc2l0b3J5L0NQUy0xLjAgSW5jLiBieSBSZWYuLExJQUIuTFRE | ||
11 | KGMpOTYwWzANBgkqhkiG9w0BAQEFAANKADBHAkAOy7xxCAIkOfuIA2LyRpxgKlDO | ||
12 | Rl8htdXYhF5iBGUx1GYaK6KF+bK/CCI0l4j2OfWGFBUrwGoWqxTNcWgTfMzRAgMB | ||
13 | AAGjggI5MIICNTAJBgNVHRMEAjAAMIICJgYDVR0DBIICHTCCAhkwggIVMIICEQYL | ||
14 | YIZIAYb4RQEHAQEwggIAFoIBq1RoaXMgY2VydGlmaWNhdGUgaW5jb3Jwb3JhdGVz | ||
15 | IGJ5IH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| ||
45 | owIq3s3wx10xAAAAAAA= | ||
46 | -----END PKCS7----- | ||
diff --git a/src/lib/libssl/test/testreq2.pem b/src/lib/libssl/test/testreq2.pem new file mode 100644 index 0000000000..c3cdcffcbc --- /dev/null +++ b/src/lib/libssl/test/testreq2.pem | |||
@@ -0,0 +1,7 @@ | |||
1 | -----BEGIN CERTIFICATE REQUEST----- | ||
2 | MIHaMIGFAgEAMA4xDDAKBgNVBAMTA2NuNDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC | ||
3 | QQCQsnkyUGDY2R3mYoeTprFJKgWuJ3f1jUjlIuW5+wfAUoeMt35c4vcFZ2mIBpEG | ||
4 | DtzkNQN1kr2O9ldm9zYnYhyhAgMBAAGgEjAQBgorBgEEAYI3AgEOMQIwADANBgkq | ||
5 | hkiG9w0BAQQFAANBAAb2szZgVIxg3vK6kYLjGSBISyuzcXJ6IvuPW6M+yzi1Qgoi | ||
6 | gQhazHTJp91T8ItZEzUJGZSZl2e5iXlnffWB+/U= | ||
7 | -----END CERTIFICATE REQUEST----- | ||
diff --git a/src/lib/libssl/test/testrsa.pem b/src/lib/libssl/test/testrsa.pem new file mode 100644 index 0000000000..aad21067a8 --- /dev/null +++ b/src/lib/libssl/test/testrsa.pem | |||
@@ -0,0 +1,9 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | MIIBPAIBAAJBAKrbeqkuRk8VcRmWFmtP+LviMB3+6dizWW3DwaffznyHGAFwUJ/I | ||
3 | Tv0XtbsCyl3QoyKGhrOAy3RvPK5M38iuXT0CAwEAAQJAZ3cnzaHXM/bxGaR5CR1R | ||
4 | rD1qFBAVfoQFiOH9uPJgMaoAuoQEisPHVcZDKcOv4wEg6/TInAIXBnEigtqvRzuy | ||
5 | oQIhAPcgZzUq3yVooAaoov8UbXPxqHlwo6GBMqnv20xzkf6ZAiEAsP4BnIaQTM8S | ||
6 | mvcpHZwQJdmdHHkGKAs37Dfxi67HbkUCIQCeZGliHXFa071Fp06ZeWlR2ADonTZz | ||
7 | rJBhdTe0v5pCeQIhAIZfkiGgGBX4cIuuckzEm43g9WMUjxP/0GlK39vIyihxAiEA | ||
8 | mymehFRT0MvqW5xAKAx7Pgkt8HVKwVhc2LwGKHE0DZM= | ||
9 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/test/testsid.pem b/src/lib/libssl/test/testsid.pem new file mode 100644 index 0000000000..cd8617be2e --- /dev/null +++ b/src/lib/libssl/test/testsid.pem | |||
@@ -0,0 +1,12 @@ | |||
1 | -----BEGIN SSL SESSION PARAMETERS----- | ||
2 | MIIBxwIBAQIBAgQDAQCABBCi11xa5qkOP8xrr02K/NQCBBBkIYQZM0Bt95W0EHNV | ||
3 | bA58oQYCBDIBr7WiBAICASyjggGGMIIBgjCCASwCAQMwDQYJKoZIhvcNAQEEBQAw | ||
4 | ODELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3Jz | ||
5 | YSB0ZXN0IENBMB4XDTk1MTAwOTIzMzEzNFoXDTk4MDcwNTIzMzEzNFowYDELMAkG | ||
6 | A1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEZMBcGA1UEChMQTWluY29tIFB0eS4gTHRk | ||
7 | LjELMAkGA1UECxMCQ1MxGzAZBgNVBAMTElNTTGVheSBkZW1vIGNsaWVudDBcMA0G | ||
8 | CSqGSIb3DQEBAQUAA0sAMEgCQQC4pcXEL1lgVA+B5Q3TcuW/O3LZHoA73IYm8oFD | ||
9 | TezgCDhL2RTMn+seKWF36UtJKRIOBU9jZHCVVd0Me5ls6BEjAgMBAAEwDQYJKoZI | ||
10 | hvcNAQEEBQADQQBoIpOcwUY1qlVF7j3ROSGvUsbvByOBFmYWkIBgsCqR+9qo1A7L | ||
11 | CrWF5i8LWt/vLwAHaxWNx2YuBJMFyuK81fTv | ||
12 | -----END SSL SESSION PARAMETERS----- | ||
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss new file mode 100644 index 0000000000..a5aecf4694 --- /dev/null +++ b/src/lib/libssl/test/testss | |||
@@ -0,0 +1,89 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | digest='-mdc2' | ||
4 | reqcmd="../apps/ssleay req" | ||
5 | x509cmd="../apps/ssleay x509 $digest" | ||
6 | verifycmd="../apps/ssleay verify" | ||
7 | |||
8 | CAkey="keyCA.ss" | ||
9 | CAcert="certCA.ss" | ||
10 | CAreq="reqCA.ss" | ||
11 | CAconf="CAss.cnf" | ||
12 | CAreq2="req2CA.ss" # temp | ||
13 | |||
14 | Uconf="Uss.cnf" | ||
15 | Ukey="keyU.ss" | ||
16 | Ureq="reqU.ss" | ||
17 | Ucert="certU.ss" | ||
18 | |||
19 | echo | ||
20 | echo "make a certificate request using 'req'" | ||
21 | $reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss | ||
22 | if [ $? != 0 ]; then | ||
23 | echo "error using 'req' to generate a certificate request" | ||
24 | exit 1 | ||
25 | fi | ||
26 | echo | ||
27 | echo "convert the certificate request into a self signed certificate using 'x509'" | ||
28 | $x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss | ||
29 | if [ $? != 0 ]; then | ||
30 | echo "error using 'x509' to self sign a certificate request" | ||
31 | exit 1 | ||
32 | fi | ||
33 | |||
34 | echo | ||
35 | echo "convert a certificate into a certificate request using 'x509'" | ||
36 | $x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss | ||
37 | if [ $? != 0 ]; then | ||
38 | echo "error using 'x509' convert a certificate to a certificate request" | ||
39 | exit 1 | ||
40 | fi | ||
41 | |||
42 | $reqcmd -verify -in $CAreq -noout | ||
43 | if [ $? != 0 ]; then | ||
44 | echo first generated request is invalid | ||
45 | exit 1 | ||
46 | fi | ||
47 | |||
48 | $reqcmd -verify -in $CAreq2 -noout | ||
49 | if [ $? != 0 ]; then | ||
50 | echo second generated request is invalid | ||
51 | exit 1 | ||
52 | fi | ||
53 | |||
54 | $verifycmd -CAfile $CAcert $CAcert | ||
55 | if [ $? != 0 ]; then | ||
56 | echo first generated cert is invalid | ||
57 | exit 1 | ||
58 | fi | ||
59 | |||
60 | echo | ||
61 | echo "make another certificate request using 'req'" | ||
62 | $reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss | ||
63 | if [ $? != 0 ]; then | ||
64 | echo "error using 'req' to generate a certificate request" | ||
65 | exit 1 | ||
66 | fi | ||
67 | |||
68 | echo | ||
69 | echo "sign certificate request with the just created CA via 'x509'" | ||
70 | $x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss | ||
71 | if [ $? != 0 ]; then | ||
72 | echo "error using 'x509' to sign a certificate request" | ||
73 | exit 1 | ||
74 | fi | ||
75 | |||
76 | $verifycmd -CAfile $CAcert $Ucert | ||
77 | echo | ||
78 | echo "Certificate details" | ||
79 | $x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert | ||
80 | |||
81 | echo | ||
82 | echo The generated CA certificate is $CAcert | ||
83 | echo The generated CA private key is $CAkey | ||
84 | |||
85 | echo The generated user certificate is $Ucert | ||
86 | echo The generated user private key is $Ukey | ||
87 | |||
88 | /bin/rm err.ss | ||
89 | exit 0 | ||
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl new file mode 100644 index 0000000000..f115adb8e1 --- /dev/null +++ b/src/lib/libssl/test/testssl | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | echo test sslv2 | ||
4 | ./ssltest -ssl2 || exit 1 | ||
5 | |||
6 | echo test sslv2 with server authentication | ||
7 | ./ssltest -ssl2 -server_auth -CApath ../certs || exit 1 | ||
8 | |||
9 | echo test sslv2 with client authentication | ||
10 | ./ssltest -ssl2 -client_auth -CApath ../certs || exit 1 | ||
11 | |||
12 | echo test sslv2 with both client and server authentication | ||
13 | ./ssltest -ssl2 -server_auth -client_auth -CApath ../certs || exit 1 | ||
14 | |||
15 | echo test sslv3 | ||
16 | ./ssltest -ssl3 || exit 1 | ||
17 | |||
18 | echo test sslv3 with server authentication | ||
19 | ./ssltest -ssl3 -server_auth -CApath ../certs || exit 1 | ||
20 | |||
21 | echo test sslv3 with client authentication | ||
22 | ./ssltest -ssl3 -client_auth -CApath ../certs || exit 1 | ||
23 | |||
24 | echo test sslv3 with both client and server authentication | ||
25 | ./ssltest -ssl3 -server_auth -client_auth -CApath ../certs || exit 1 | ||
26 | |||
27 | echo test sslv2/sslv3 | ||
28 | ./ssltest || exit 1 | ||
29 | |||
30 | echo test sslv2/sslv3 with server authentication | ||
31 | ./ssltest -server_auth -CApath ../certs || exit 1 | ||
32 | |||
33 | echo test sslv2/sslv3 with client authentication | ||
34 | ./ssltest -client_auth -CApath ../certs || exit 1 | ||
35 | |||
36 | echo test sslv2/sslv3 with both client and server authentication | ||
37 | ./ssltest -server_auth -client_auth -CApath ../certs || exit 1 | ||
38 | |||
39 | exit 0 | ||
40 | |||
diff --git a/src/lib/libssl/test/testx509.pem b/src/lib/libssl/test/testx509.pem new file mode 100644 index 0000000000..8a85d14964 --- /dev/null +++ b/src/lib/libssl/test/testx509.pem | |||
@@ -0,0 +1,10 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIBWzCCAQYCARgwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMCQVUxDDAKBgNV | ||
3 | BAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3JzYSB0ZXN0IENBMB4XDTk1MDYxOTIz | ||
4 | MzMxMloXDTk1MDcxNzIzMzMxMlowOjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FM | ||
5 | RDEdMBsGA1UEAxMUU1NMZWF5L3JzYSB0ZXN0IGNlcnQwXDANBgkqhkiG9w0BAQEF | ||
6 | AANLADBIAkEAqtt6qS5GTxVxGZYWa0/4u+IwHf7p2LNZbcPBp9/OfIcYAXBQn8hO | ||
7 | /Re1uwLKXdCjIoaGs4DLdG88rkzfyK5dPQIDAQABMAwGCCqGSIb3DQIFBQADQQAE | ||
8 | Wc7EcF8po2/ZO6kNCwK/ICH6DobgLekA5lSLr5EvuioZniZp5lFzAw4+YzPQ7XKJ | ||
9 | zl9HYIMxATFyqSiD9jsx | ||
10 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/test/times b/src/lib/libssl/test/times new file mode 100644 index 0000000000..49aeebf216 --- /dev/null +++ b/src/lib/libssl/test/times | |||
@@ -0,0 +1,113 @@ | |||
1 | |||
2 | More number for the questions about SSL overheads.... | ||
3 | |||
4 | The following numbers were generated on a pentium pro 200, running linux. | ||
5 | They give an indication of the SSL protocol and encryption overheads. | ||
6 | |||
7 | The program that generated them is an unreleased version of ssl/ssltest.c | ||
8 | which is the SSLeay ssl protocol testing program. It is a single process that | ||
9 | talks both sides of the SSL protocol via a non-blocking memory buffer | ||
10 | interface. | ||
11 | |||
12 | How do I read this? The protocol and cipher are reasonable obvious. | ||
13 | The next number is the number of connections being made. The next is the | ||
14 | number of bytes exchanged bewteen the client and server side of the protocol. | ||
15 | This is the number of bytes that the client sends to the server, and then | ||
16 | the server sends back. Because this is all happening in one process, | ||
17 | the data is being encrypted, decrypted, encrypted and then decrypted again. | ||
18 | It is a round trip of that many bytes. Because the one process performs | ||
19 | both the client and server sides of the protocol and it sends this many bytes | ||
20 | each direction, multiply this number by 4 to generate the number | ||
21 | of bytes encrypted/decrypted/MACed. The first time value is how many seconds | ||
22 | elapsed doing a full SSL handshake, the second is the cost of one | ||
23 | full handshake and the rest being session-id reuse. | ||
24 | |||
25 | SSLv2 RC4-MD5 1000 x 1 12.83s 0.70s | ||
26 | SSLv3 NULL-MD5 1000 x 1 14.35s 1.47s | ||
27 | SSLv3 RC4-MD5 1000 x 1 14.46s 1.56s | ||
28 | SSLv3 RC4-MD5 1000 x 1 51.93s 1.62s 1024bit RSA | ||
29 | SSLv3 RC4-SHA 1000 x 1 14.61s 1.83s | ||
30 | SSLv3 DES-CBC-SHA 1000 x 1 14.70s 1.89s | ||
31 | SSLv3 DES-CBC3-SHA 1000 x 1 15.16s 2.16s | ||
32 | |||
33 | SSLv2 RC4-MD5 1000 x 1024 13.72s 1.27s | ||
34 | SSLv3 NULL-MD5 1000 x 1024 14.79s 1.92s | ||
35 | SSLv3 RC4-MD5 1000 x 1024 52.58s 2.29s 1024bit RSA | ||
36 | SSLv3 RC4-SHA 1000 x 1024 15.39s 2.67s | ||
37 | SSLv3 DES-CBC-SHA 1000 x 1024 16.45s 3.55s | ||
38 | SSLv3 DES-CBC3-SHA 1000 x 1024 18.21s 5.38s | ||
39 | |||
40 | SSLv2 RC4-MD5 1000 x 10240 18.97s 6.52s | ||
41 | SSLv3 NULL-MD5 1000 x 10240 17.79s 5.11s | ||
42 | SSLv3 RC4-MD5 1000 x 10240 20.25s 7.90s | ||
43 | SSLv3 RC4-MD5 1000 x 10240 58.26s 8.08s 1024bit RSA | ||
44 | SSLv3 RC4-SHA 1000 x 10240 22.96s 11.44s | ||
45 | SSLv3 DES-CBC-SHA 1000 x 10240 30.65s 18.41s | ||
46 | SSLv3 DES-CBC3-SHA 1000 x 10240 47.04s 34.53s | ||
47 | |||
48 | SSLv2 RC4-MD5 1000 x 102400 70.22s 57.74s | ||
49 | SSLv3 NULL-MD5 1000 x 102400 43.73s 31.03s | ||
50 | SSLv3 RC4-MD5 1000 x 102400 71.32s 58.83s | ||
51 | SSLv3 RC4-MD5 1000 x 102400 109.66s 59.20s 1024bit RSA | ||
52 | SSLv3 RC4-SHA 1000 x 102400 95.88s 82.21s | ||
53 | SSLv3 DES-CBC-SHA 1000 x 102400 173.22s 160.55s | ||
54 | SSLv3 DES-CBC3-SHA 1000 x 102400 336.61s 323.82s | ||
55 | |||
56 | What does this all mean? Well for a server, with no session-id reuse, with | ||
57 | a transfer size of 10240 bytes, using RC4-MD5 and a 512bit server key, | ||
58 | a pentium pro 200 running linux can handle the SSLv3 protocol overheads of | ||
59 | about 49 connections a second. Reality will be quite different :-). | ||
60 | |||
61 | Remeber the first number is 1000 full ssl handshakes, the second is | ||
62 | 1 full and 999 with session-id reuse. The RSA overheads for each exchange | ||
63 | would be one public and one private operation, but the protocol/MAC/cipher | ||
64 | cost would be quite similar in both the client and server. | ||
65 | |||
66 | eric (adding numbers to speculation) | ||
67 | |||
68 | --- Appendix --- | ||
69 | - The time measured is user time but these number a very rough. | ||
70 | - Remember this is the cost of both client and server sides of the protocol. | ||
71 | - The TCP/kernal overhead of connection establishment is normally the | ||
72 | killer in SSL. Often delays in the TCP protocol will make session-id | ||
73 | reuse look slower that new sessions, but this would not be the case on | ||
74 | a loaded server. | ||
75 | - The TCP round trip latencies, while slowing indervidual connections, | ||
76 | would have minimal impact on throughput. | ||
77 | - Instead of sending one 102400 byte buffer, one 8k buffer is sent until | ||
78 | - the required number of bytes are processed. | ||
79 | - The SSLv3 connections were actually SSLv2 compatable SSLv3 headers. | ||
80 | - A 512bit server key was being used except where noted. | ||
81 | - No server key verification was being performed on the client side of the | ||
82 | protocol. This would slow things down very little. | ||
83 | - The library being used is SSLeay 0.8.x. | ||
84 | - The normal mesauring system was commands of the form | ||
85 | time ./ssltest -num 1000 -bytes 102400 -cipher DES-CBC-SHA -reuse | ||
86 | This modified version of ssltest should be in the next public release of | ||
87 | SSLeay. | ||
88 | |||
89 | The general cipher performace number for this platform are | ||
90 | |||
91 | SSLeay 0.8.2a 04-Sep-1997 | ||
92 | built on Fri Sep 5 17:37:05 EST 1997 | ||
93 | options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) idea(int) blowfish(ptr2) | ||
94 | C flags:gcc -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized | ||
95 | The 'numbers' are in 1000s of bytes per second processed. | ||
96 | type 8 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes | ||
97 | md2 131.02k 368.41k 500.57k 549.21k 566.09k | ||
98 | mdc2 535.60k 589.10k 595.88k 595.97k 594.54k | ||
99 | md5 1801.53k 9674.77k 17484.03k 21849.43k 23592.96k | ||
100 | sha 1261.63k 5533.25k 9285.63k 11187.88k 11913.90k | ||
101 | sha1 1103.13k 4782.53k 7933.78k 9472.34k 10070.70k | ||
102 | rc4 10722.53k 14443.93k 15215.79k 15299.24k 15219.59k | ||
103 | des cbc 3286.57k 3827.73k 3913.39k 3931.82k 3926.70k | ||
104 | des ede3 1443.50k 1549.08k 1561.17k 1566.38k 1564.67k | ||
105 | idea cbc 2203.64k 2508.16k 2538.33k 2543.62k 2547.71k | ||
106 | rc2 cbc 1430.94k 1511.59k 1524.82k 1527.13k 1523.33k | ||
107 | blowfish cbc 4716.07k 5965.82k 6190.17k 6243.67k 6234.11k | ||
108 | sign verify | ||
109 | rsa 512 bits 0.0100s 0.0011s | ||
110 | rsa 1024 bits 0.0451s 0.0012s | ||
111 | rsa 2048 bits 0.2605s 0.0086s | ||
112 | rsa 4096 bits 1.6883s 0.0302s | ||
113 | |||
diff --git a/src/lib/libssl/test/tpkcs7 b/src/lib/libssl/test/tpkcs7 new file mode 100644 index 0000000000..ea1f005dac --- /dev/null +++ b/src/lib/libssl/test/tpkcs7 | |||
@@ -0,0 +1,51 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay pkcs7' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testp7.pem | ||
12 | fi | ||
13 | |||
14 | echo testing pkcs7 conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | echo "p -> p" | ||
21 | $cmd -in fff.p -inform p -outform p >f.p | ||
22 | if [ $? != 0 ]; then exit 1; fi | ||
23 | |||
24 | echo "d -> d" | ||
25 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
26 | if [ $? != 0 ]; then exit 1; fi | ||
27 | echo "p -> d" | ||
28 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | |||
31 | echo "d -> p" | ||
32 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
33 | if [ $? != 0 ]; then exit 1; fi | ||
34 | echo "p -> p" | ||
35 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
36 | if [ $? != 0 ]; then exit 1; fi | ||
37 | |||
38 | cmp fff.p f.p | ||
39 | if [ $? != 0 ]; then exit 1; fi | ||
40 | cmp fff.p ff.p1 | ||
41 | if [ $? != 0 ]; then exit 1; fi | ||
42 | cmp fff.p ff.p3 | ||
43 | if [ $? != 0 ]; then exit 1; fi | ||
44 | |||
45 | cmp f.p ff.p1 | ||
46 | if [ $? != 0 ]; then exit 1; fi | ||
47 | cmp f.p ff.p3 | ||
48 | if [ $? != 0 ]; then exit 1; fi | ||
49 | |||
50 | /bin/rm -f f.* ff.* fff.* | ||
51 | exit 0 | ||
diff --git a/src/lib/libssl/test/tpkcs7d b/src/lib/libssl/test/tpkcs7d new file mode 100644 index 0000000000..c8f18fb09c --- /dev/null +++ b/src/lib/libssl/test/tpkcs7d | |||
@@ -0,0 +1,44 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay pkcs7' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=pkcs7-1.pem | ||
12 | fi | ||
13 | |||
14 | echo testing pkcs7 conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | echo "p -> p" | ||
21 | $cmd -in fff.p -inform p -outform p >f.p | ||
22 | if [ $? != 0 ]; then exit 1; fi | ||
23 | |||
24 | echo "d -> d" | ||
25 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
26 | if [ $? != 0 ]; then exit 1; fi | ||
27 | echo "p -> d" | ||
28 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | |||
31 | echo "d -> p" | ||
32 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
33 | if [ $? != 0 ]; then exit 1; fi | ||
34 | echo "p -> p" | ||
35 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
36 | if [ $? != 0 ]; then exit 1; fi | ||
37 | |||
38 | cmp f.p ff.p1 | ||
39 | if [ $? != 0 ]; then exit 1; fi | ||
40 | cmp f.p ff.p3 | ||
41 | if [ $? != 0 ]; then exit 1; fi | ||
42 | |||
43 | /bin/rm -f f.* ff.* fff.* | ||
44 | exit 0 | ||
diff --git a/src/lib/libssl/test/treq b/src/lib/libssl/test/treq new file mode 100644 index 0000000000..e5f1d8cc41 --- /dev/null +++ b/src/lib/libssl/test/treq | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay req' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testreq.pem | ||
12 | fi | ||
13 | |||
14 | echo testing req conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | #echo "p -> t" | ||
21 | #$cmd -in fff.p -inform p -outform t >f.t | ||
22 | #if [ $? != 0 ]; then exit 1; fi | ||
23 | echo "p -> p" | ||
24 | $cmd -in fff.p -inform p -outform p >f.p | ||
25 | if [ $? != 0 ]; then exit 1; fi | ||
26 | |||
27 | echo "d -> d" | ||
28 | $cmd -verify -in f.d -inform d -outform d >ff.d1 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | #echo "t -> d" | ||
31 | #$cmd -in f.t -inform t -outform d >ff.d2 | ||
32 | #if [ $? != 0 ]; then exit 1; fi | ||
33 | echo "p -> d" | ||
34 | $cmd -verify -in f.p -inform p -outform d >ff.d3 | ||
35 | if [ $? != 0 ]; then exit 1; fi | ||
36 | |||
37 | #echo "d -> t" | ||
38 | #$cmd -in f.d -inform d -outform t >ff.t1 | ||
39 | #if [ $? != 0 ]; then exit 1; fi | ||
40 | #echo "t -> t" | ||
41 | #$cmd -in f.t -inform t -outform t >ff.t2 | ||
42 | #if [ $? != 0 ]; then exit 1; fi | ||
43 | #echo "p -> t" | ||
44 | #$cmd -in f.p -inform p -outform t >ff.t3 | ||
45 | #if [ $? != 0 ]; then exit 1; fi | ||
46 | |||
47 | echo "d -> p" | ||
48 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
49 | if [ $? != 0 ]; then exit 1; fi | ||
50 | #echo "t -> p" | ||
51 | #$cmd -in f.t -inform t -outform p >ff.p2 | ||
52 | #if [ $? != 0 ]; then exit 1; fi | ||
53 | echo "p -> p" | ||
54 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
55 | if [ $? != 0 ]; then exit 1; fi | ||
56 | |||
57 | cmp fff.p f.p | ||
58 | if [ $? != 0 ]; then exit 1; fi | ||
59 | cmp fff.p ff.p1 | ||
60 | if [ $? != 0 ]; then exit 1; fi | ||
61 | #cmp fff.p ff.p2 | ||
62 | #if [ $? != 0 ]; then exit 1; fi | ||
63 | cmp fff.p ff.p3 | ||
64 | if [ $? != 0 ]; then exit 1; fi | ||
65 | |||
66 | #cmp f.t ff.t1 | ||
67 | #if [ $? != 0 ]; then exit 1; fi | ||
68 | #cmp f.t ff.t2 | ||
69 | #if [ $? != 0 ]; then exit 1; fi | ||
70 | #cmp f.t ff.t3 | ||
71 | #if [ $? != 0 ]; then exit 1; fi | ||
72 | |||
73 | cmp f.p ff.p1 | ||
74 | if [ $? != 0 ]; then exit 1; fi | ||
75 | #cmp f.p ff.p2 | ||
76 | #if [ $? != 0 ]; then exit 1; fi | ||
77 | cmp f.p ff.p3 | ||
78 | if [ $? != 0 ]; then exit 1; fi | ||
79 | |||
80 | /bin/rm -f f.* ff.* fff.* | ||
81 | exit 0 | ||
diff --git a/src/lib/libssl/test/trsa b/src/lib/libssl/test/trsa new file mode 100644 index 0000000000..e5b8fe0448 --- /dev/null +++ b/src/lib/libssl/test/trsa | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay rsa' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testrsa.pem | ||
12 | fi | ||
13 | |||
14 | echo testing rsa conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | #echo "p -> t" | ||
21 | #$cmd -in fff.p -inform p -outform t >f.t | ||
22 | #if [ $? != 0 ]; then exit 1; fi | ||
23 | echo "p -> p" | ||
24 | $cmd -in fff.p -inform p -outform p >f.p | ||
25 | if [ $? != 0 ]; then exit 1; fi | ||
26 | |||
27 | echo "d -> d" | ||
28 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | #echo "t -> d" | ||
31 | #$cmd -in f.t -inform t -outform d >ff.d2 | ||
32 | #if [ $? != 0 ]; then exit 1; fi | ||
33 | echo "p -> d" | ||
34 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
35 | if [ $? != 0 ]; then exit 1; fi | ||
36 | |||
37 | #echo "d -> t" | ||
38 | #$cmd -in f.d -inform d -outform t >ff.t1 | ||
39 | #if [ $? != 0 ]; then exit 1; fi | ||
40 | #echo "t -> t" | ||
41 | #$cmd -in f.t -inform t -outform t >ff.t2 | ||
42 | #if [ $? != 0 ]; then exit 1; fi | ||
43 | #echo "p -> t" | ||
44 | #$cmd -in f.p -inform p -outform t >ff.t3 | ||
45 | #if [ $? != 0 ]; then exit 1; fi | ||
46 | |||
47 | echo "d -> p" | ||
48 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
49 | if [ $? != 0 ]; then exit 1; fi | ||
50 | #echo "t -> p" | ||
51 | #$cmd -in f.t -inform t -outform p >ff.p2 | ||
52 | #if [ $? != 0 ]; then exit 1; fi | ||
53 | echo "p -> p" | ||
54 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
55 | if [ $? != 0 ]; then exit 1; fi | ||
56 | |||
57 | cmp fff.p f.p | ||
58 | if [ $? != 0 ]; then exit 1; fi | ||
59 | cmp fff.p ff.p1 | ||
60 | if [ $? != 0 ]; then exit 1; fi | ||
61 | #cmp fff.p ff.p2 | ||
62 | #if [ $? != 0 ]; then exit 1; fi | ||
63 | cmp fff.p ff.p3 | ||
64 | if [ $? != 0 ]; then exit 1; fi | ||
65 | |||
66 | #cmp f.t ff.t1 | ||
67 | #if [ $? != 0 ]; then exit 1; fi | ||
68 | #cmp f.t ff.t2 | ||
69 | #if [ $? != 0 ]; then exit 1; fi | ||
70 | #cmp f.t ff.t3 | ||
71 | #if [ $? != 0 ]; then exit 1; fi | ||
72 | |||
73 | cmp f.p ff.p1 | ||
74 | if [ $? != 0 ]; then exit 1; fi | ||
75 | #cmp f.p ff.p2 | ||
76 | #if [ $? != 0 ]; then exit 1; fi | ||
77 | cmp f.p ff.p3 | ||
78 | if [ $? != 0 ]; then exit 1; fi | ||
79 | |||
80 | /bin/rm -f f.* ff.* fff.* | ||
81 | exit 0 | ||
diff --git a/src/lib/libssl/test/tsid b/src/lib/libssl/test/tsid new file mode 100644 index 0000000000..8c7e9b1387 --- /dev/null +++ b/src/lib/libssl/test/tsid | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay sess_id' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testsid.pem | ||
12 | fi | ||
13 | |||
14 | echo testing session-id conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | #echo "p -> t" | ||
21 | #$cmd -in fff.p -inform p -outform t >f.t | ||
22 | #if [ $? != 0 ]; then exit 1; fi | ||
23 | echo "p -> p" | ||
24 | $cmd -in fff.p -inform p -outform p >f.p | ||
25 | if [ $? != 0 ]; then exit 1; fi | ||
26 | |||
27 | echo "d -> d" | ||
28 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | #echo "t -> d" | ||
31 | #$cmd -in f.t -inform t -outform d >ff.d2 | ||
32 | #if [ $? != 0 ]; then exit 1; fi | ||
33 | echo "p -> d" | ||
34 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
35 | if [ $? != 0 ]; then exit 1; fi | ||
36 | |||
37 | #echo "d -> t" | ||
38 | #$cmd -in f.d -inform d -outform t >ff.t1 | ||
39 | #if [ $? != 0 ]; then exit 1; fi | ||
40 | #echo "t -> t" | ||
41 | #$cmd -in f.t -inform t -outform t >ff.t2 | ||
42 | #if [ $? != 0 ]; then exit 1; fi | ||
43 | #echo "p -> t" | ||
44 | #$cmd -in f.p -inform p -outform t >ff.t3 | ||
45 | #if [ $? != 0 ]; then exit 1; fi | ||
46 | |||
47 | echo "d -> p" | ||
48 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
49 | if [ $? != 0 ]; then exit 1; fi | ||
50 | #echo "t -> p" | ||
51 | #$cmd -in f.t -inform t -outform p >ff.p2 | ||
52 | #if [ $? != 0 ]; then exit 1; fi | ||
53 | echo "p -> p" | ||
54 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
55 | if [ $? != 0 ]; then exit 1; fi | ||
56 | |||
57 | cmp fff.p f.p | ||
58 | if [ $? != 0 ]; then exit 1; fi | ||
59 | cmp fff.p ff.p1 | ||
60 | if [ $? != 0 ]; then exit 1; fi | ||
61 | #cmp fff.p ff.p2 | ||
62 | #if [ $? != 0 ]; then exit 1; fi | ||
63 | cmp fff.p ff.p3 | ||
64 | if [ $? != 0 ]; then exit 1; fi | ||
65 | |||
66 | #cmp f.t ff.t1 | ||
67 | #if [ $? != 0 ]; then exit 1; fi | ||
68 | #cmp f.t ff.t2 | ||
69 | #if [ $? != 0 ]; then exit 1; fi | ||
70 | #cmp f.t ff.t3 | ||
71 | #if [ $? != 0 ]; then exit 1; fi | ||
72 | |||
73 | cmp f.p ff.p1 | ||
74 | if [ $? != 0 ]; then exit 1; fi | ||
75 | #cmp f.p ff.p2 | ||
76 | #if [ $? != 0 ]; then exit 1; fi | ||
77 | cmp f.p ff.p3 | ||
78 | if [ $? != 0 ]; then exit 1; fi | ||
79 | |||
80 | /bin/rm -f f.* ff.* fff.* | ||
81 | exit 0 | ||
diff --git a/src/lib/libssl/test/tx509 b/src/lib/libssl/test/tx509 new file mode 100644 index 0000000000..f8d1f82cdd --- /dev/null +++ b/src/lib/libssl/test/tx509 | |||
@@ -0,0 +1,81 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=../apps:$PATH | ||
4 | export PATH | ||
5 | |||
6 | cmd='../apps/ssleay x509' | ||
7 | |||
8 | if [ "$1"x != "x" ]; then | ||
9 | t=$1 | ||
10 | else | ||
11 | t=testx509.pem | ||
12 | fi | ||
13 | |||
14 | echo testing X509 conversions | ||
15 | cp $t fff.p | ||
16 | |||
17 | echo "p -> d" | ||
18 | $cmd -in fff.p -inform p -outform d >f.d | ||
19 | if [ $? != 0 ]; then exit 1; fi | ||
20 | echo "p -> n" | ||
21 | $cmd -in fff.p -inform p -outform n >f.n | ||
22 | if [ $? != 0 ]; then exit 1; fi | ||
23 | echo "p -> p" | ||
24 | $cmd -in fff.p -inform p -outform p >f.p | ||
25 | if [ $? != 0 ]; then exit 1; fi | ||
26 | |||
27 | echo "d -> d" | ||
28 | $cmd -in f.d -inform d -outform d >ff.d1 | ||
29 | if [ $? != 0 ]; then exit 1; fi | ||
30 | echo "n -> d" | ||
31 | $cmd -in f.n -inform n -outform d >ff.d2 | ||
32 | if [ $? != 0 ]; then exit 1; fi | ||
33 | echo "p -> d" | ||
34 | $cmd -in f.p -inform p -outform d >ff.d3 | ||
35 | if [ $? != 0 ]; then exit 1; fi | ||
36 | |||
37 | echo "d -> n" | ||
38 | $cmd -in f.d -inform d -outform n >ff.n1 | ||
39 | if [ $? != 0 ]; then exit 1; fi | ||
40 | echo "n -> n" | ||
41 | $cmd -in f.n -inform n -outform n >ff.n2 | ||
42 | if [ $? != 0 ]; then exit 1; fi | ||
43 | echo "p -> n" | ||
44 | $cmd -in f.p -inform p -outform n >ff.n3 | ||
45 | if [ $? != 0 ]; then exit 1; fi | ||
46 | |||
47 | echo "d -> p" | ||
48 | $cmd -in f.d -inform d -outform p >ff.p1 | ||
49 | if [ $? != 0 ]; then exit 1; fi | ||
50 | echo "n -> p" | ||
51 | $cmd -in f.n -inform n -outform p >ff.p2 | ||
52 | if [ $? != 0 ]; then exit 1; fi | ||
53 | echo "p -> p" | ||
54 | $cmd -in f.p -inform p -outform p >ff.p3 | ||
55 | if [ $? != 0 ]; then exit 1; fi | ||
56 | |||
57 | cmp fff.p f.p | ||
58 | if [ $? != 0 ]; then exit 1; fi | ||
59 | cmp fff.p ff.p1 | ||
60 | if [ $? != 0 ]; then exit 1; fi | ||
61 | cmp fff.p ff.p2 | ||
62 | if [ $? != 0 ]; then exit 1; fi | ||
63 | cmp fff.p ff.p3 | ||
64 | if [ $? != 0 ]; then exit 1; fi | ||
65 | |||
66 | cmp f.n ff.n1 | ||
67 | if [ $? != 0 ]; then exit 1; fi | ||
68 | cmp f.n ff.n2 | ||
69 | if [ $? != 0 ]; then exit 1; fi | ||
70 | cmp f.n ff.n3 | ||
71 | if [ $? != 0 ]; then exit 1; fi | ||
72 | |||
73 | cmp f.p ff.p1 | ||
74 | if [ $? != 0 ]; then exit 1; fi | ||
75 | cmp f.p ff.p2 | ||
76 | if [ $? != 0 ]; then exit 1; fi | ||
77 | cmp f.p ff.p3 | ||
78 | if [ $? != 0 ]; then exit 1; fi | ||
79 | |||
80 | /bin/rm -f f.* ff.* fff.* | ||
81 | exit 0 | ||
diff --git a/src/lib/libssl/test/v3-cert1.pem b/src/lib/libssl/test/v3-cert1.pem new file mode 100644 index 0000000000..0da253d5c3 --- /dev/null +++ b/src/lib/libssl/test/v3-cert1.pem | |||
@@ -0,0 +1,16 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIICjTCCAfigAwIBAgIEMaYgRzALBgkqhkiG9w0BAQQwRTELMAkGA1UEBhMCVVMx | ||
3 | NjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlz | ||
4 | dHJhdGlvbjAmFxE5NjA1MjgxMzQ5MDUrMDgwMBcROTgwNTI4MTM0OTA1KzA4MDAw | ||
5 | ZzELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu | ||
6 | ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEgMAkGA1UEBRMCMTYwEwYDVQQDEwxTdGV2 | ||
7 | ZSBTY2hvY2gwWDALBgkqhkiG9w0BAQEDSQAwRgJBALrAwyYdgxmzNP/ts0Uyf6Bp | ||
8 | miJYktU/w4NG67ULaN4B5CnEz7k57s9o3YY3LecETgQ5iQHmkwlYDTL2fTgVfw0C | ||
9 | AQOjgaswgagwZAYDVR0ZAQH/BFowWDBWMFQxCzAJBgNVBAYTAlVTMTYwNAYDVQQK | ||
10 | Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x | ||
11 | DTALBgNVBAMTBENSTDEwFwYDVR0BAQH/BA0wC4AJODMyOTcwODEwMBgGA1UdAgQR | ||
12 | MA8ECTgzMjk3MDgyM4ACBSAwDQYDVR0KBAYwBAMCBkAwCwYJKoZIhvcNAQEEA4GB | ||
13 | AH2y1VCEw/A4zaXzSYZJTTUi3uawbbFiS2yxHvgf28+8Js0OHXk1H1w2d6qOHH21 | ||
14 | X82tZXd/0JtG0g1T9usFFBDvYK8O0ebgz/P5ELJnBL2+atObEuJy1ZZ0pBDWINR3 | ||
15 | WkDNLCGiTkCKp0F5EWIrVDwh54NNevkCQRZita+z4IBO | ||
16 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/test/v3-cert2.pem b/src/lib/libssl/test/v3-cert2.pem new file mode 100644 index 0000000000..de0723ff8d --- /dev/null +++ b/src/lib/libssl/test/v3-cert2.pem | |||
@@ -0,0 +1,16 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIICiTCCAfKgAwIBAgIEMeZfHzANBgkqhkiG9w0BAQQFADB9MQswCQYDVQQGEwJD | ||
3 | YTEPMA0GA1UEBxMGTmVwZWFuMR4wHAYDVQQLExVObyBMaWFiaWxpdHkgQWNjZXB0 | ||
4 | ZWQxHzAdBgNVBAoTFkZvciBEZW1vIFB1cnBvc2VzIE9ubHkxHDAaBgNVBAMTE0Vu | ||
5 | dHJ1c3QgRGVtbyBXZWIgQ0EwHhcNOTYwNzEyMTQyMDE1WhcNOTYxMDEyMTQyMDE1 | ||
6 | WjB0MSQwIgYJKoZIhvcNAQkBExVjb29rZUBpc3NsLmF0bC5ocC5jb20xCzAJBgNV | ||
7 | BAYTAlVTMScwJQYDVQQLEx5IZXdsZXR0IFBhY2thcmQgQ29tcGFueSAoSVNTTCkx | ||
8 | FjAUBgNVBAMTDVBhdWwgQS4gQ29va2UwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA | ||
9 | 6ceSq9a9AU6g+zBwaL/yVmW1/9EE8s5you1mgjHnj0wAILuoB3L6rm6jmFRy7QZT | ||
10 | G43IhVZdDua4e+5/n1ZslwIDAQABo2MwYTARBglghkgBhvhCAQEEBAMCB4AwTAYJ | ||
11 | YIZIAYb4QgENBD8WPVRoaXMgY2VydGlmaWNhdGUgaXMgb25seSBpbnRlbmRlZCBm | ||
12 | b3IgZGVtb25zdHJhdGlvbiBwdXJwb3Nlcy4wDQYJKoZIhvcNAQEEBQADgYEAi8qc | ||
13 | F3zfFqy1sV8NhjwLVwOKuSfhR/Z8mbIEUeSTlnH3QbYt3HWZQ+vXI8mvtZoBc2Fz | ||
14 | lexKeIkAZXCesqGbs6z6nCt16P6tmdfbZF3I3AWzLquPcOXjPf4HgstkyvVBn0Ap | ||
15 | jAFN418KF/Cx4qyHB4cjdvLrRjjQLnb2+ibo7QU= | ||
16 | -----END CERTIFICATE----- | ||