1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* Copyright (C) 1997-2000 Matt Newman <matt@novadigm.com>
*
* $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsBIO.c,v 1.6 2002/02/04 22:46:31 hobbs Exp $
*
* Provides BIO layer to interface openssl to Tcl.
*/
#include "tlsInt.h"
/*
* Forward declarations
*/
static int BioWrite _ANSI_ARGS_ ((BIO *h, CONST char *buf, int num));
static int BioRead _ANSI_ARGS_ ((BIO *h, char *buf, int num));
static int BioPuts _ANSI_ARGS_ ((BIO *h, CONST char *str));
static long BioCtrl _ANSI_ARGS_ ((BIO *h, int cmd, long arg1, CONST char *ptr));
static int BioNew _ANSI_ARGS_ ((BIO *h));
static int BioFree _ANSI_ARGS_ ((BIO *h));
static BIO_METHOD BioMethods = {
BIO_TYPE_TCL, "tcl",
BioWrite,
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*
* Copyright (C) 1997-2000 Matt Newman <matt@novadigm.com>
*
* $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsBIO.c,v 1.7 2004/02/04 04:02:19 razzell Exp $
*
* Provides BIO layer to interface openssl to Tcl.
*/
#include "tlsInt.h"
/*
* Forward declarations
*/
static int BioWrite _ANSI_ARGS_ ((BIO *h, CONST char *buf, int num));
static int BioRead _ANSI_ARGS_ ((BIO *h, char *buf, int num));
static int BioPuts _ANSI_ARGS_ ((BIO *h, CONST char *str));
static long BioCtrl _ANSI_ARGS_ ((BIO *h, int cmd, long arg1, void *ptr));
static int BioNew _ANSI_ARGS_ ((BIO *h));
static int BioFree _ANSI_ARGS_ ((BIO *h));
static BIO_METHOD BioMethods = {
BIO_TYPE_TCL, "tcl",
BioWrite,
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
}
static long
BioCtrl (bio, cmd, num, ptr)
BIO *bio;
int cmd;
long num;
CONST char *ptr;
{
Tcl_Channel chan = Tls_GetParent((State*)bio->ptr);
long ret = 1;
int *ip;
dprintf(stderr,"\nBioCtrl(0x%x, 0x%x, 0x%x, 0x%x)",
(unsigned int) bio, (unsigned int) cmd, (unsigned int) num,
|
|
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
}
static long
BioCtrl (bio, cmd, num, ptr)
BIO *bio;
int cmd;
long num;
void *ptr;
{
Tcl_Channel chan = Tls_GetParent((State*)bio->ptr);
long ret = 1;
int *ip;
dprintf(stderr,"\nBioCtrl(0x%x, 0x%x, 0x%x, 0x%x)",
(unsigned int) bio, (unsigned int) cmd, (unsigned int) num,
|