summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkus <>2002-09-05 22:45:21 +0000
committermarkus <>2002-09-05 22:45:21 +0000
commit154dc21ed42de3fb550aa3c54823498ea9aa644a (patch)
tree3df1e6f498b0d69e73af47546f15f51272e4f960
parente08fb7998d733407336e83a299f140b0c1d2fcd3 (diff)
parent2a6851ef8adb0e84ff2515493d3704a13c6256b0 (diff)
downloadopenbsd-154dc21ed42de3fb550aa3c54823498ea9aa644a.tar.gz
openbsd-154dc21ed42de3fb550aa3c54823498ea9aa644a.tar.bz2
openbsd-154dc21ed42de3fb550aa3c54823498ea9aa644a.zip
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
-rw-r--r--src/lib/libcrypto/util/dirname.pl18
-rw-r--r--src/lib/libcrypto/util/pod2mantest7
-rw-r--r--src/lib/libssl/src/INSTALL.DJGPP32
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_do_handshake.pod75
-rw-r--r--src/lib/libssl/src/test/dummytest.c47
-rw-r--r--src/lib/libssl/src/util/dirname.pl18
-rw-r--r--src/lib/libssl/src/util/pod2mantest7
-rw-r--r--src/lib/libssl/test/dummytest.c47
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
3if ($#ARGV < 0) {
4 die "dirname.pl: too few arguments\n";
5} elsif ($#ARGV > 0) {
6 die "dirname.pl: too many arguments\n";
7}
8
9my $d = $ARGV[0];
10
11if ($d =~ m|.*/.*|) {
12 $d =~ s|/[^/]*$||;
13} else {
14 $d = ".";
15}
16
17print $d,"\n";
18exit(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
13IFS=: 13IFS=:
14try_without_dir=true 14if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi
15try_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.
16for dir in dummy:$PATH; do 17for 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
47echo "No working pod2man found. Consider installing a new version." >&2 48echo "No working pod2man found. Consider installing a new version." >&2
48if [ "$1" = ignore ]; then 49if [ "$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
52fi 53fi
53exit 1 54exit 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
5SSL_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
15SSL_do_handshake() will wait for a SSL/TLS handshake to take place. If the
16connection is in client mode, the handshake will be started. The handshake
17routines may have to be explicitly set in advance using either
18L<SSL_set_connect_state(3)|SSL_set_connect_state(3)> or
19L<SSL_set_accept_state(3)|SSL_set_accept_state(3)>.
20
21=head1 NOTES
22
23The behaviour of SSL_do_handshake() depends on the underlying BIO.
24
25If the underlying BIO is B<blocking>, SSL_do_handshake() will only return
26once 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,
28but SSL_get_error() will yield B<SSL_ERROR_WANT_READ/WRITE> and
29SSL_do_handshake() should be called again.
30
31If the underlying BIO is B<non-blocking>, SSL_do_handshake() will also return
32when the underlying BIO could not satisfy the needs of SSL_do_handshake()
33to continue the handshake. In this case a call to SSL_get_error() with the
34return value of SSL_do_handshake() will yield B<SSL_ERROR_WANT_READ> or
35B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
36taking appropriate action to satisfy the needs of SSL_do_handshake().
37The action depends on the underlying BIO. When using a non-blocking socket,
38nothing is to be done, but select() can be used to check for the required
39condition. When using a buffering BIO, like a BIO pair, data must be written
40into or retrieved out of the BIO before being able to continue.
41
42=head1 RETURN VALUES
43
44The following return values can occur:
45
46=over 4
47
48=item 1
49
50The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
51established.
52
53=item 0
54
55The TLS/SSL handshake was not successful but was shut down controlled and
56by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
57return value B<ret> to find out the reason.
58
59=item E<lt>0
60
61The TLS/SSL handshake was not successful because a fatal error occurred either
62at the protocol level or a connection failure occurred. The shutdown was
63not clean. It can also occur of action is need to continue the operation
64for non-blocking BIOs. Call SSL_get_error() with the return value B<ret>
65to find out the reason.
66
67=back
68
69=head1 SEE ALSO
70
71L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>,
72L<SSL_accept(3)|SSL_accept(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>,
73L<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
9int 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
3if ($#ARGV < 0) {
4 die "dirname.pl: too few arguments\n";
5} elsif ($#ARGV > 0) {
6 die "dirname.pl: too many arguments\n";
7}
8
9my $d = $ARGV[0];
10
11if ($d =~ m|.*/.*|) {
12 $d =~ s|/[^/]*$||;
13} else {
14 $d = ".";
15}
16
17print $d,"\n";
18exit(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
13IFS=: 13IFS=:
14try_without_dir=true 14if test "$OSTYPE" = "msdosdjgpp"; then IFS=";"; fi
15try_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.
16for dir in dummy:$PATH; do 17for 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
47echo "No working pod2man found. Consider installing a new version." >&2 48echo "No working pod2man found. Consider installing a new version." >&2
48if [ "$1" = ignore ]; then 49if [ "$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
52fi 53fi
53exit 1 54exit 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
9int 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 }