/[anubis]/anubis/testsuite/mta.c
ViewVC logotype

Diff of /anubis/testsuite/mta.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by gray, Tue May 27 19:52:21 2003 UTC revision 1.5 by polak, Fri Jun 6 06:52:40 2003 UTC
# Line 87  char *tls_cert;          /* TLS sertific Line 87  char *tls_cert;          /* TLS sertific
87  char *tls_key;           /* TLS key */  char *tls_key;           /* TLS key */
88  char *tls_cafile;  char *tls_cafile;
89    
 #define enable_tls() (tls_cafile != NULL || (tls_cert != NULL && tls_key != NULL))  
   
90  #define DH_BITS 768  #define DH_BITS 768
91    #define enable_tls() (tls_cafile != NULL || (tls_cert != NULL && tls_key != NULL))
92    void tls_init(void);
93    
94  gnutls_dh_params dh_params;  gnutls_dh_params dh_params;
95  static gnutls_certificate_server_credentials x509_cred;  static gnutls_certificate_server_credentials x509_cred;
96  #endif  #endif /* HAVE_TLS */
97    
98  char *progname;  char *progname;
99    
# Line 101  int mta_daemon(int, char **); Line 101  int mta_daemon(int, char **);
101  int mta_stdio(int, char **);  int mta_stdio(int, char **);
102  void error(const char *, ...);  void error(const char *, ...);
103  void smtp_reply(int, char *, ...);  void smtp_reply(int, char *, ...);
104    void reset_capa(char *);
105    
106  #define R_CONT     0x8000  #define R_CONT     0x8000
107  #define R_CODEMASK 0xfff  #define R_CODEMASK 0xfff
# Line 254  const char *(*_mta_strerror)(int) = _def Line 255  const char *(*_mta_strerror)(int) = _def
255  #ifdef HAVE_TLS  #ifdef HAVE_TLS
256    
257  static void  static void
258  _tls_cleanup_x509()  _tls_cleanup_x509(void)
259  {  {
260          if (x509_cred)          if (x509_cred)
261                  gnutls_certificate_free_credentials(x509_cred);                  gnutls_certificate_free_credentials(x509_cred);
# Line 275  generate_dh_params(void) Line 276  generate_dh_params(void)
276  }  }
277    
278  void  void
279  tls_init()  tls_init(void)
280  {  {
281          if (!enable_tls())          if (!enable_tls())
282                  return;                  return;
# Line 393  tls_session_init(void) Line 394  tls_session_init(void)
394  }  }
395    
396  void  void
397  smtp_starttls()  smtp_starttls(void)
398  {  {
399          gnutls_session session;          gnutls_session session;
400    
# Line 411  smtp_starttls() Line 412  smtp_starttls()
412                  smtp_reply(530, "TLS negotiation failed");                  smtp_reply(530, "TLS negotiation failed");
413  }  }
414    
415  #endif  #endif /* HAVE_TLS */
416    
417  void  void
418  smtp_reply(int code, char *fmt, ...)  smtp_reply(int code, char *fmt, ...)
# Line 580  smtp_ehlo(int extended) Line 581  smtp_ehlo(int extended)
581  }  }
582    
583  void  void
584  smtp_help()  smtp_help(void)
585  {  {
586          smtp_reply(502, "HELP not implemented");          smtp_reply(502, "HELP not implemented");
587  }  }
588    
589  void  void
590  smtp()  smtp(void)
591  {  {
592          int state;          int state;
593          char buf[128];          char buf[128];

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26