140 static char *cipher=NULL;
145 #define TEST_SERVER_CERT "SSL_SERVER_CERTIFICATE"
150 unsigned short int length;
153 #define RPC_HDR_SIZE (sizeof(struct rpc_msg) - 4092)
155 static $DESCRIPTOR(sysnet,
"SYS$NET");
171 status = SYS
$QIOW ( 0, chan, IO$_READVBLK, &iosb, 0, 0,
172 buffer, maxlen, 0, 0, 0, 0 );
173 if ( (status&1) == 1 ) status = iosb.status;
174 if ( (status&1) == 1 ) *
length = iosb.count;
182 status = SYS
$QIOW ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0,
183 buffer, length, 0, 0, 0, 0 );
184 if ( (status&1) == 1 ) status = iosb.status;
195 int main (
int argc,
char **argv )
201 char *CApath=NULL,*CAfile=NULL;
211 status = SYS
$ASSIGN ( &sysnet, &chan, 0, 0, 0 );
212 printf(
"status of assign to SYS$NET: %d\n", status );
219 if (bio_stdout == NULL)
225 if (cipher == NULL) cipher=getenv(
"SSL_CIPHER");
226 printf(
"cipher list: %s\n", cipher ? cipher :
"{undefined}" );
236 if (s_ctx == NULL)
goto end;
246 status =
doit ( chan, s_ctx );
259 int status,
length, link_state;
271 if (s_ssl == NULL)
goto err;
275 if ((s_to_c == NULL) || (c_to_s == NULL))
goto err;
285 if ((c_bio == NULL) || (s_bio == NULL))
goto err;
292 printf(
"Begin doit main loop\n");
296 for (link_state = 0; link_state < 3; ) {
300 while ( link_state == 0 ) {
301 status =
get ( chan, (
char *) &msg,
sizeof(msg), &
length );
302 if ( (status&1) == 0 ) {
303 printf(
"Error in main loop get: %d\n", status );
308 printf(
"Error in main loop get size: %d\n", length );
312 if ( msg.channel !=
'A' ) {
313 printf(
"Error in main loop, unexpected channel: %c\n",
318 if ( msg.function ==
'G' ) {
320 }
else if ( msg.function ==
'P' ) {
322 }
else if ( msg.function ==
'X' ) {
328 if ( link_state == 1 ) {
330 if ( i < 0 ) link_state = 3;
336 if ( (status&1) == 0 )
break;
339 }
else if ( link_state == 2 ) {
341 if ( i < 0 ) link_state = 3;
347 if ( (status&1) == 0 )
break;
352 fprintf(stdout,
"DONE\n");
364 if (c_to_s != NULL)
BIO_free(c_to_s);
365 if (s_to_c != NULL)
BIO_free(s_to_c);