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