diff options
-rw-r--r-- | src/lib/libcrypto/util/dirname.pl | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/util/pod2mantest | 7 | ||||
-rw-r--r-- | src/lib/libssl/src/INSTALL.DJGPP | 32 | ||||
-rw-r--r-- | src/lib/libssl/src/doc/ssl/SSL_do_handshake.pod | 75 | ||||
-rw-r--r-- | src/lib/libssl/src/test/dummytest.c | 47 | ||||
-rw-r--r-- | src/lib/libssl/src/util/dirname.pl | 18 | ||||
-rw-r--r-- | src/lib/libssl/src/util/pod2mantest | 7 | ||||
-rw-r--r-- | src/lib/libssl/test/dummytest.c | 47 |
8 files changed, 245 insertions, 6 deletions
diff --git a/src/lib/libcrypto/util/dirname.pl b/src/lib/libcrypto/util/dirname.pl new file mode 100644 index 0000000000..d7a66d96ac --- /dev/null +++ b/src/lib/libcrypto/util/dirname.pl | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | if ($#ARGV < 0) { | ||
4 | die "dirname.pl: too few arguments\n"; | ||
5 | } elsif ($#ARGV > 0) { | ||
6 | die "dirname.pl: too many arguments\n"; | ||
7 | } | ||
8 | |||
9 | my $d = $ARGV[0]; | ||
10 | |||
11 | if ($d =~ m|.*/.*|) { | ||
12 | $d =~ s|/[^/]*$||; | ||
13 | } else { | ||
14 | $d = "."; | ||
15 | } | ||
16 | |||
17 | print $d,"\n"; | ||
18 | exit(0); | ||
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest index 79aefafac0..e01c6192a7 100644 --- a/src/lib/libcrypto/util/pod2mantest +++ b/src/lib/libcrypto/util/pod2mantest | |||
@@ -11,9 +11,10 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | IFS=: | 13 | IFS=: |
14 | try_without_dir=true | 14 | if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi |
15 | try_without_dir=false | ||
15 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. | 16 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. |
16 | for dir in dummy:$PATH; do | 17 | for dir in dummy${IFS}$PATH; do |
17 | if [ "$try_without_dir" = true ]; then | 18 | if [ "$try_without_dir" = true ]; then |
18 | # first iteration | 19 | # first iteration |
19 | pod2man=pod2man | 20 | pod2man=pod2man |
@@ -47,7 +48,7 @@ done | |||
47 | echo "No working pod2man found. Consider installing a new version." >&2 | 48 | echo "No working pod2man found. Consider installing a new version." >&2 |
48 | if [ "$1" = ignore ]; then | 49 | if [ "$1" = ignore ]; then |
49 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 | 50 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 |
50 | echo "util/pod2man.pl" | 51 | echo "../../util/pod2man.pl" |
51 | exit 0 | 52 | exit 0 |
52 | fi | 53 | fi |
53 | exit 1 | 54 | exit 1 |
diff --git a/src/lib/libssl/src/INSTALL.DJGPP b/src/lib/libssl/src/INSTALL.DJGPP new file mode 100644 index 0000000000..0120b946b5 --- /dev/null +++ b/src/lib/libssl/src/INSTALL.DJGPP | |||
@@ -0,0 +1,32 @@ | |||
1 | |||
2 | |||
3 | INSTALLATION ON THE DOS PLATFORM WITH DJGPP | ||
4 | ------------------------------------------- | ||
5 | |||
6 | Openssl has been ported to DOS, but only with long filename support. If | ||
7 | you wish to compile on native DOS with 8+3 filenames, you will have to | ||
8 | tweak the installation yourself, including renaming files with illegal | ||
9 | or duplicate names. | ||
10 | |||
11 | You should have a full DJGPP environment installed, including the | ||
12 | latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package | ||
13 | requires that PERL and BC also be installed. | ||
14 | |||
15 | All of these can be obtained from the usual DJGPP mirror sites, such as | ||
16 | "ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp". You also need to have | ||
17 | the WATT-32 networking package installed before you try to compile | ||
18 | openssl. This can be obtained from "http://www.bgnett.no/~giva/". The | ||
19 | Makefile assumes that the WATT-32 code is in directory "watt32" under | ||
20 | /dev/env/DJDIR. | ||
21 | |||
22 | To compile openssl, start your BASH shell. Then configure for DOS by | ||
23 | running "./Configure" with appropriate arguments. The basic syntax for | ||
24 | DOS is: | ||
25 | ./Configure no-threads --prefix=/dev/env/DJDIR DJGPP | ||
26 | |||
27 | You may run out of DPMI selectors when running in a DOS box under | ||
28 | Windows. If so, just close the BASH shell, go back to Windows, and | ||
29 | restart BASH. Then run "make" again. | ||
30 | |||
31 | Building openssl under DJGPP has been tested with DJGPP 2.03, | ||
32 | GCC 2.952, GCC 2.953, perl 5.005_02 and perl 5.006_01. | ||
diff --git a/src/lib/libssl/src/doc/ssl/SSL_do_handshake.pod b/src/lib/libssl/src/doc/ssl/SSL_do_handshake.pod new file mode 100644 index 0000000000..243576451b --- /dev/null +++ b/src/lib/libssl/src/doc/ssl/SSL_do_handshake.pod | |||
@@ -0,0 +1,75 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | SSL_do_handshake - perform a TLS/SSL handshake | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/ssl.h> | ||
10 | |||
11 | int SSL_do_handshake(SSL *ssl); | ||
12 | |||
13 | =head1 DESCRIPTION | ||
14 | |||
15 | SSL_do_handshake() will wait for a SSL/TLS handshake to take place. If the | ||
16 | connection is in client mode, the handshake will be started. The handshake | ||
17 | routines may have to be explicitly set in advance using either | ||
18 | L<SSL_set_connect_state(3)|SSL_set_connect_state(3)> or | ||
19 | L<SSL_set_accept_state(3)|SSL_set_accept_state(3)>. | ||
20 | |||
21 | =head1 NOTES | ||
22 | |||
23 | The behaviour of SSL_do_handshake() depends on the underlying BIO. | ||
24 | |||
25 | If the underlying BIO is B<blocking>, SSL_do_handshake() will only return | ||
26 | once the handshake has been finished or an error occurred, except for SGC | ||
27 | (Server Gated Cryptography). For SGC, SSL_do_handshake() may return with -1, | ||
28 | but SSL_get_error() will yield B<SSL_ERROR_WANT_READ/WRITE> and | ||
29 | SSL_do_handshake() should be called again. | ||
30 | |||
31 | If the underlying BIO is B<non-blocking>, SSL_do_handshake() will also return | ||
32 | when the underlying BIO could not satisfy the needs of SSL_do_handshake() | ||
33 | to continue the handshake. In this case a call to SSL_get_error() with the | ||
34 | return value of SSL_do_handshake() will yield B<SSL_ERROR_WANT_READ> or | ||
35 | B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after | ||
36 | taking appropriate action to satisfy the needs of SSL_do_handshake(). | ||
37 | The action depends on the underlying BIO. When using a non-blocking socket, | ||
38 | nothing is to be done, but select() can be used to check for the required | ||
39 | condition. When using a buffering BIO, like a BIO pair, data must be written | ||
40 | into or retrieved out of the BIO before being able to continue. | ||
41 | |||
42 | =head1 RETURN VALUES | ||
43 | |||
44 | The following return values can occur: | ||
45 | |||
46 | =over 4 | ||
47 | |||
48 | =item 1 | ||
49 | |||
50 | The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been | ||
51 | established. | ||
52 | |||
53 | =item 0 | ||
54 | |||
55 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
56 | by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the | ||
57 | return value B<ret> to find out the reason. | ||
58 | |||
59 | =item E<lt>0 | ||
60 | |||
61 | The TLS/SSL handshake was not successful because a fatal error occurred either | ||
62 | at the protocol level or a connection failure occurred. The shutdown was | ||
63 | not clean. It can also occur of action is need to continue the operation | ||
64 | for non-blocking BIOs. Call SSL_get_error() with the return value B<ret> | ||
65 | to find out the reason. | ||
66 | |||
67 | =back | ||
68 | |||
69 | =head1 SEE ALSO | ||
70 | |||
71 | L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>, | ||
72 | L<SSL_accept(3)|SSL_accept(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>, | ||
73 | L<SSL_set_connect_state(3)|SSL_set_connect_state(3)> | ||
74 | |||
75 | =cut | ||
diff --git a/src/lib/libssl/src/test/dummytest.c b/src/lib/libssl/src/test/dummytest.c new file mode 100644 index 0000000000..f98f003ef9 --- /dev/null +++ b/src/lib/libssl/src/test/dummytest.c | |||
@@ -0,0 +1,47 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | #include <ctype.h> | ||
5 | #include <openssl/e_os2.h> | ||
6 | #include <openssl/buffer.h> | ||
7 | #include <openssl/crypto.h> | ||
8 | |||
9 | int main(int argc, char *argv[]) | ||
10 | { | ||
11 | char *p, *q, *program; | ||
12 | |||
13 | p = strrchr(argv[0], '/'); | ||
14 | if (!p) p = strrchr(argv[0], '\\'); | ||
15 | #ifdef OPENSSL_SYS_VMS | ||
16 | if (!p) p = strrchr(argv[0], ']'); | ||
17 | if (p) q = strrchr(p, '>'); | ||
18 | if (q) p = q; | ||
19 | if (!p) p = strrchr(argv[0], ':'); | ||
20 | q = 0; | ||
21 | #endif | ||
22 | if (p) p++; | ||
23 | if (!p) p = argv[0]; | ||
24 | if (p) q = strchr(p, '.'); | ||
25 | if (p && !q) q = p + strlen(p); | ||
26 | |||
27 | if (!p) | ||
28 | program = BUF_strdup("(unknown)"); | ||
29 | else | ||
30 | { | ||
31 | program = OPENSSL_malloc((q - p) + 1); | ||
32 | strncpy(program, p, q - p); | ||
33 | program[q - p] = '\0'; | ||
34 | } | ||
35 | |||
36 | for(p = program; *p; p++) | ||
37 | if (islower(*p)) *p = toupper(*p); | ||
38 | |||
39 | q = strstr(program, "TEST"); | ||
40 | if (q > p && q[-1] == '_') q--; | ||
41 | *q = '\0'; | ||
42 | |||
43 | printf("No %s support\n", program); | ||
44 | |||
45 | OPENSSL_free(program); | ||
46 | return(0); | ||
47 | } | ||
diff --git a/src/lib/libssl/src/util/dirname.pl b/src/lib/libssl/src/util/dirname.pl new file mode 100644 index 0000000000..d7a66d96ac --- /dev/null +++ b/src/lib/libssl/src/util/dirname.pl | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | if ($#ARGV < 0) { | ||
4 | die "dirname.pl: too few arguments\n"; | ||
5 | } elsif ($#ARGV > 0) { | ||
6 | die "dirname.pl: too many arguments\n"; | ||
7 | } | ||
8 | |||
9 | my $d = $ARGV[0]; | ||
10 | |||
11 | if ($d =~ m|.*/.*|) { | ||
12 | $d =~ s|/[^/]*$||; | ||
13 | } else { | ||
14 | $d = "."; | ||
15 | } | ||
16 | |||
17 | print $d,"\n"; | ||
18 | exit(0); | ||
diff --git a/src/lib/libssl/src/util/pod2mantest b/src/lib/libssl/src/util/pod2mantest index 79aefafac0..e01c6192a7 100644 --- a/src/lib/libssl/src/util/pod2mantest +++ b/src/lib/libssl/src/util/pod2mantest | |||
@@ -11,9 +11,10 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | IFS=: | 13 | IFS=: |
14 | try_without_dir=true | 14 | if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi |
15 | try_without_dir=false | ||
15 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. | 16 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. |
16 | for dir in dummy:$PATH; do | 17 | for dir in dummy${IFS}$PATH; do |
17 | if [ "$try_without_dir" = true ]; then | 18 | if [ "$try_without_dir" = true ]; then |
18 | # first iteration | 19 | # first iteration |
19 | pod2man=pod2man | 20 | pod2man=pod2man |
@@ -47,7 +48,7 @@ done | |||
47 | echo "No working pod2man found. Consider installing a new version." >&2 | 48 | echo "No working pod2man found. Consider installing a new version." >&2 |
48 | if [ "$1" = ignore ]; then | 49 | if [ "$1" = ignore ]; then |
49 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 | 50 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 |
50 | echo "util/pod2man.pl" | 51 | echo "../../util/pod2man.pl" |
51 | exit 0 | 52 | exit 0 |
52 | fi | 53 | fi |
53 | exit 1 | 54 | exit 1 |
diff --git a/src/lib/libssl/test/dummytest.c b/src/lib/libssl/test/dummytest.c new file mode 100644 index 0000000000..f98f003ef9 --- /dev/null +++ b/src/lib/libssl/test/dummytest.c | |||
@@ -0,0 +1,47 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | #include <ctype.h> | ||
5 | #include <openssl/e_os2.h> | ||
6 | #include <openssl/buffer.h> | ||
7 | #include <openssl/crypto.h> | ||
8 | |||
9 | int main(int argc, char *argv[]) | ||
10 | { | ||
11 | char *p, *q, *program; | ||
12 | |||
13 | p = strrchr(argv[0], '/'); | ||
14 | if (!p) p = strrchr(argv[0], '\\'); | ||
15 | #ifdef OPENSSL_SYS_VMS | ||
16 | if (!p) p = strrchr(argv[0], ']'); | ||
17 | if (p) q = strrchr(p, '>'); | ||
18 | if (q) p = q; | ||
19 | if (!p) p = strrchr(argv[0], ':'); | ||
20 | q = 0; | ||
21 | #endif | ||
22 | if (p) p++; | ||
23 | if (!p) p = argv[0]; | ||
24 | if (p) q = strchr(p, '.'); | ||
25 | if (p && !q) q = p + strlen(p); | ||
26 | |||
27 | if (!p) | ||
28 | program = BUF_strdup("(unknown)"); | ||
29 | else | ||
30 | { | ||
31 | program = OPENSSL_malloc((q - p) + 1); | ||
32 | strncpy(program, p, q - p); | ||
33 | program[q - p] = '\0'; | ||
34 | } | ||
35 | |||
36 | for(p = program; *p; p++) | ||
37 | if (islower(*p)) *p = toupper(*p); | ||
38 | |||
39 | q = strstr(program, "TEST"); | ||
40 | if (q > p && q[-1] == '_') q--; | ||
41 | *q = '\0'; | ||
42 | |||
43 | printf("No %s support\n", program); | ||
44 | |||
45 | OPENSSL_free(program); | ||
46 | return(0); | ||
47 | } | ||