Ejemplo n.º 1
0
int
main()
{
    LHASH *conf;
    long eline;
    char *s;

#ifdef USE_WIN32
    CONF_set_default_method(CONF_WIN32);
#endif
    conf = CONF_load(NULL, "ssleay.cnf", &eline);
    if (conf == NULL) {
        ERR_load_crypto_strings();
        printf("unable to load configuration, line %ld\n", eline);
        ERR_print_errors_fp(stderr);
        exit(1);
    }
    lh_stats(conf, stdout);
    lh_node_stats(conf, stdout);
    lh_node_usage_stats(conf, stdout);

    s = CONF_get_string(conf, NULL, "init2");
    printf("init2=%s\n", (s == NULL) ? "NULL" : s);

    s = CONF_get_string(conf, NULL, "cipher1");
    printf("cipher1=%s\n", (s == NULL) ? "NULL" : s);

    s = CONF_get_string(conf, "s_client", "cipher1");
    printf("s_client:cipher1=%s\n", (s == NULL) ? "NULL" : s);

    printf("---------------------------- DUMP ------------------------\n");
    CONF_dump_fp(conf, stdout);

    return 0;
}
Ejemplo n.º 2
0
main()
	{
	LHASH *conf;
	long eline;
	char *s,*s2;

#ifdef USE_WIN32
	CONF_set_default_method(CONF_WIN32);
#endif
	conf=CONF_load(NULL,"ssleay.cnf",&eline);
	if (conf == NULL)
		{
		ERR_load_crypto_strings();
		TINYCLR_SSL_PRINTF("unable to load configuration, line %ld\n",eline);
		ERR_print_errors_fp(OPENSSL_TYPE__FILE_STDERR);
		TINYCLR_SSL_EXIT(1);
		}
	lh_stats(conf,OPENSSL_TYPE__FILE_STDOUT);
	lh_node_stats(conf,OPENSSL_TYPE__FILE_STDOUT);
	lh_node_usage_stats(conf,OPENSSL_TYPE__FILE_STDOUT);

	s=CONF_get_string(conf,NULL,"init2");
	TINYCLR_SSL_PRINTF("init2=%s\n",(s == NULL)?"NULL":s);

	s=CONF_get_string(conf,NULL,"cipher1");
	TINYCLR_SSL_PRINTF("cipher1=%s\n",(s == NULL)?"NULL":s);

	s=CONF_get_string(conf,"s_client","cipher1");
	TINYCLR_SSL_PRINTF("s_client:cipher1=%s\n",(s == NULL)?"NULL":s);

	TINYCLR_SSL_PRINTF("---------------------------- DUMP ------------------------\n");
	CONF_dump_fp(conf, OPENSSL_TYPE__FILE_STDOUT);

	TINYCLR_SSL_EXIT(0);
	}