projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initialise i if n == 0
[oweals/openssl.git]
/
ssl
/
ssl_task.c
diff --git
a/ssl/ssl_task.c
b/ssl/ssl_task.c
index c27ce913e7b0b85f04318df9e8324595fd6d7799..b5ce44b47c56e44fcd245089742002a2fbb0fed0 100644
(file)
--- a/
ssl/ssl_task.c
+++ b/
ssl/ssl_task.c
@@
-1,5
+1,5
@@
/* ssl/ssl_task.c */
/* ssl/ssl_task.c */
-/* Copyright (C) 1995-199
7
Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-199
8
Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* All rights reserved.
*
* This package is an SSL implementation written
@@
-123,11
+123,13
@@
int LIB$INIT_TIMER(), LIB$SHOW_TIMER();
#include <string.h> /* from ssltest.c */
#include <errno.h>
#include <string.h> /* from ssltest.c */
#include <errno.h>
-#include "buffer.h"
-#include "../e_os.h"
-#include "x509.h"
-#include "ssl.h"
-#include "err.h"
+
+#include "e_os.h"
+
+#include <openssl/buffer.h>
+#include <openssl/x509.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth,
int error);
int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth,
int error);
@@
-224,8
+226,12
@@
int main ( int argc, char **argv )
printf("cipher list: %s\n", cipher ? cipher : "{undefined}" );
SSL_load_error_strings();
printf("cipher list: %s\n", cipher ? cipher : "{undefined}" );
SSL_load_error_strings();
+ OpenSSL_add_all_algorithms();
+/* DRM, this was the original, but there is no such thing as SSLv2()
s_ctx=SSL_CTX_new(SSLv2());
s_ctx=SSL_CTX_new(SSLv2());
+*/
+ s_ctx=SSL_CTX_new(SSLv2_server_method());
if (s_ctx == NULL) goto end;
if (s_ctx == NULL) goto end;
@@
-252,7
+258,7
@@
int doit(io_channel chan, SSL_CTX *s_ctx )
{
int status, length, link_state;
struct rpc_msg msg;
{
int status, length, link_state;
struct rpc_msg msg;
- static char cbuf[200],sbuf[200];
+
SSL *s_ssl=NULL;
BIO *c_to_s=NULL;
BIO *s_to_c=NULL;
SSL *s_ssl=NULL;
BIO *c_to_s=NULL;
BIO *s_to_c=NULL;
@@
-267,8
+273,12
@@
int doit(io_channel chan, SSL_CTX *s_ctx )
c_to_s=BIO_new(BIO_s_rtcp());
s_to_c=BIO_new(BIO_s_rtcp());
if ((s_to_c == NULL) || (c_to_s == NULL)) goto err;
c_to_s=BIO_new(BIO_s_rtcp());
s_to_c=BIO_new(BIO_s_rtcp());
if ((s_to_c == NULL) || (c_to_s == NULL)) goto err;
+/* original, DRM 24-SEP-1997
BIO_set_fd ( c_to_s, "", chan );
BIO_set_fd ( s_to_c, "", chan );
BIO_set_fd ( c_to_s, "", chan );
BIO_set_fd ( s_to_c, "", chan );
+*/
+ BIO_set_fd ( c_to_s, 0, chan );
+ BIO_set_fd ( s_to_c, 0, chan );
c_bio=BIO_new(BIO_f_ssl());
s_bio=BIO_new(BIO_f_ssl());
c_bio=BIO_new(BIO_f_ssl());
s_bio=BIO_new(BIO_f_ssl());