1 /* mcb - this file breaks the build process; temporarily deactivating */
6 #include <sys/socket.h>
7 #include <netinet/in.h>
11 int main(int argc
, char *argv
[])
14 int sockfd
, portno
, rc
;
15 struct sockaddr_in serv_addr
;
16 struct hostent
*server
;
19 sockfd
= socket(AF_INET
,SOCK_STREAM
,0);
21 fprintf(stderr
,"Error creating socket\n");
25 server
= gethostbyname(argv
[1]);
27 fprintf(stderr
,"Error looking up host %s\n",argv
[1]);
35 printf("Calling CreateSSLHello()\n");
36 rc
= CreateSSLHello(&ssl
);
37 printf("Finished calling CreateSSLHello()\n");
39 bzero((char *) &serv_addr
, sizeof(serv_addr
));
40 serv_addr
.sin_family
= AF_INET
;
41 bcopy((char *)server
->h_addr
,(char *)&serv_addr
.sin_addr
.s_addr
,server
->h_length
);
42 serv_addr
.sin_port
= htons(portno
);
43 if(connect(sockfd
,(struct sockaddr
*) &serv_addr
, sizeof(serv_addr
)) < 0){
44 fprintf(stderr
,"ERROR connecting to server\n");
50 printf("Write ssl.buffer\n");
51 write(sockfd
,ssl
.buffer
,ssl
.length
);
52 printf("Finished writing\n");
53 ssl
.length
= read(sockfd
,ssl
.buffer
,ssl
.max_size
);
57 *matrixSslNewSession()
58 *matrixSslSetCetValidator()
61 *write handshake buffer
63 *readSslResponse() <-+
65 *read return code |-- similar/same function??
68 *sslDecode() <-------+
70 *encodeSslCloseAlert()
72 *write close alert buffer
80 * -close pki interface