1#ifndef _SMTP_SASL_AUTH_CACHE_H_INCLUDED_ 2#define _SMTP_SASL_AUTH_CACHE_H_INCLUDED_ 3 4/*++ 5/* NAME 6/* smtp_sasl_auth_cache 3h 7/* SUMMARY 8/* Postfix SASL authentication failure cache 9/* SYNOPSIS 10/* #include "smtp.h" 11/* #include "smtp_sasl_auth_cache.h" 12/* DESCRIPTION 13/* .nf 14 15 /* 16 * Utility library. 17 */ 18#include <dict.h> 19 20 /* 21 * This code stores hashed passwords which requires OpenSSL. 22 */ 23#if defined(USE_TLS) && defined(USE_SASL_AUTH) 24#define HAVE_SASL_AUTH_CACHE 25 26 /* 27 * External interface. 28 */ 29typedef struct { 30 DICT *dict; 31 int ttl; 32 char *dsn; 33 char *text; 34} SMTP_SASL_AUTH_CACHE; 35 36extern SMTP_SASL_AUTH_CACHE *smtp_sasl_auth_cache_init(const char *, int); 37extern void smtp_sasl_auth_cache_store(SMTP_SASL_AUTH_CACHE *, const SMTP_SESSION *, const SMTP_RESP *); 38extern int smtp_sasl_auth_cache_find(SMTP_SASL_AUTH_CACHE *, const SMTP_SESSION *); 39 40#define smtp_sasl_auth_cache_dsn(cp) ((cp)->dsn) 41#define smtp_sasl_auth_cache_text(cp) ((cp)->text) 42 43#endif 44 45/* LICENSE 46/* .ad 47/* .fi 48/* The Secure Mailer license must be distributed with this software. 49/* AUTHOR(S) 50/* Initial implementation by: 51/* Till Franke 52/* SuSE Rhein/Main AG 53/* 65760 Eschborn, Germany 54/* 55/* Adopted by: 56/* Wietse Venema 57/* IBM T.J. Watson Research 58/* P.O. Box 704 59/* Yorktown Heights, NY 10598, USA 60/*--*/ 61 62#endif 63