Back to index

courier  0.68.2
tlsinfo.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 2002 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 #include      "config.h"
00006 #include      "libcouriertls.h"
00007 #include      <stdio.h>
00008 #include      <string.h>
00009 #include      <stdlib.h>
00010 #if    HAVE_UNISTD_H
00011 #include      <unistd.h>
00012 #endif
00013 
00014 
00015 static const char *getenv_wrapper(const char *varname, void *dummy)
00016 {
00017        return getenv(varname);
00018 }
00019 
00020 static void report_stderr(const char *errmsg, void *dummy)
00021 {
00022        fprintf(stderr, "%s\n", errmsg);
00023 }
00024 
00025 static const struct tls_info default_info
00026        = { NULL, NULL, report_stderr, getenv_wrapper, NULL };
00027 
00028 const struct tls_info *tls_get_default_info()
00029 {
00030        return &default_info;
00031 }
00032