/* initialize secure communication, by authenticating with server*/
if (define_service(
sockfd,
server_name,
&security_context)) {
exit (EXIT_FAILURE);
};
fprintf(stdout, "Connection open...\n");
fflush(stdout);
/* start exchanging protected application data with server */
str_cli(stdin,sockfd,&security_context);
close(sockfd);
return EXIT_SUCCESS;
}
Revised application server
Description: Revised server program without DCE dependencies
File name:server_s1.c
#include "utils_s1.h"
#define value(x) (((x>='0')&&(x<='9'))?x-'0':-1)
const char * port_param = "12345"; /* set port number */
const char * server_name = "scenario1_server_princ"; /* set server principal */
char port_name[512];
int port; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.