/[anubis]/anubis/src/rc.c
ViewVC logotype

Diff of /anubis/src/rc.c

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

revision 1.22 by gray, Mon Jun 30 21:52:23 2003 UTC revision 1.23 by gray, Sun Jul 6 09:24:02 2003 UTC
# Line 364  static struct rc_secdef_child control_se Line 364  static struct rc_secdef_child control_se
364  /* FIXME: This belongs to another file */  /* FIXME: This belongs to another file */
365  #if defined(HAVE_TLS) || defined(HAVE_SSL)  #if defined(HAVE_TLS) || defined(HAVE_SSL)
366  #define KW_SSL                 1  #define KW_SSL                 1
367  #define KW_ONEWAY_SSL          2  #define KW_SSL_ONEWAY          2
368  #define KW_CERT                3  #define KW_SSL_CERT            3
369  #define KW_KEY                 4  #define KW_SSL_KEY             4
370  #define KW_CAFILE              5  #define KW_SSL_CAFILE          5
371    
372  int  int
373  tls_parser(int method, int key, LIST *arglist,  tls_parser(int method, int key, LIST *arglist,
# Line 379  tls_parser(int method, int key, LIST *ar Line 379  tls_parser(int method, int key, LIST *ar
379                  setbool(arg, topt, T_SSL);                  setbool(arg, topt, T_SSL);
380                  break;                  break;
381                                    
382          case KW_ONEWAY_SSL:          case KW_SSL_ONEWAY:
383                  setbool(arg, topt, T_SSL_ONEWAY);                  setbool(arg, topt, T_SSL_ONEWAY);
384                  break;                  break;
385                                    
386          case KW_CERT:          case KW_SSL_CERT:
387                  xfree(secure.cert);                  xfree(secure.cert);
388                  secure.cert = allocbuf(arg, MAXPATHLEN);                  secure.cert = allocbuf(arg, MAXPATHLEN);
389                  if (method == CF_CLIENT)                  if (method == CF_CLIENT)
390                          topt |= T_SSL_CKCLIENT;                                  topt |= T_SSL_CKCLIENT;        
391                  break;                  break;
392                                    
393          case KW_KEY:          case KW_SSL_KEY:
394                  xfree(secure.key);                  xfree(secure.key);
395                  secure.key = allocbuf(arg, MAXPATHLEN);                  secure.key = allocbuf(arg, MAXPATHLEN);
396                  if (method == CF_CLIENT)                  if (method == CF_CLIENT)
397                          topt |= T_SSL_CKCLIENT;                          topt |= T_SSL_CKCLIENT;
398                  break;                  break;
399                                    
400          case KW_CAFILE:          case KW_SSL_CAFILE:
401                  xfree(secure.cafile);                  xfree(secure.cafile);
402                  secure.cafile = allocbuf(arg, MAXPATHLEN);                  secure.cafile = allocbuf(arg, MAXPATHLEN);
403                  break;                  break;
# Line 409  tls_parser(int method, int key, LIST *ar Line 409  tls_parser(int method, int key, LIST *ar
409  }  }
410    
411  static struct rc_kwdef tls_kw[] = {  static struct rc_kwdef tls_kw[] = {
412          { "ssl", KW_SSL },          { "ssl",        KW_SSL },
413          { "oneway-ssl", KW_ONEWAY_SSL },          { "ssl-oneway", KW_SSL_ONEWAY },
414          { "cert", KW_CERT },          { "ssl-cert",   KW_SSL_CERT },
415          { "key", KW_KEY },          { "ssl-key",    KW_SSL_KEY },
416          { "cafile", KW_CAFILE },          { "ssl-cafile", KW_SSL_CAFILE },
417          { NULL }          { NULL }
418  };  };
419    
# Line 444  control_section_init(void) Line 444  control_section_init(void)
444  #define KW_BODY_APPEND              2  #define KW_BODY_APPEND              2
445  #define KW_BODY_CLEAR_APPEND        3  #define KW_BODY_CLEAR_APPEND        3
446  #define KW_EXTERNAL_BODY_PROCESSOR  4  #define KW_EXTERNAL_BODY_PROCESSOR  4
447    #define KW_BODY_CLEAR               5
448    
449  int  int
450  rule_parser(int method, int key, LIST *arglist,  rule_parser(int method, int key, LIST *arglist,
# Line 460  rule_parser(int method, int key, LIST *a Line 461  rule_parser(int method, int key, LIST *a
461          case KW_BODY_APPEND:          case KW_BODY_APPEND:
462                  message_append_text_file(msg, arg);                  message_append_text_file(msg, arg);
463                  break;                  break;
464    
465            case KW_BODY_CLEAR:
466                    xfree(msg->body);
467                    msg->body = strdup("");
468                    break;
469                                    
470          case KW_BODY_CLEAR_APPEND:          case KW_BODY_CLEAR_APPEND:
                 /*FIXME: There should be a separate command body-clear  
                   instead!!!  
                 */  
471                  xfree(msg->body);                  xfree(msg->body);
472                  msg->body = strdup("");                  msg->body = strdup("");
473                  message_append_text_file(msg, arg);                  message_append_text_file(msg, arg);
# Line 485  rule_parser(int method, int key, LIST *a Line 488  rule_parser(int method, int key, LIST *a
488  struct rc_kwdef rule_kw[] = {  struct rc_kwdef rule_kw[] = {
489          { "signature-file-append",   KW_SIGNATURE_FILE_APPEND },            { "signature-file-append",   KW_SIGNATURE_FILE_APPEND },  
490          { "body-append",             KW_BODY_APPEND },                      { "body-append",             KW_BODY_APPEND },            
491          { "body-clear-append",       KW_BODY_CLEAR_APPEND },                { "body-clear-append",       KW_BODY_CLEAR_APPEND },
492            { "body-clear",              KW_BODY_CLEAR },
493          { "external-body-processor", KW_EXTERNAL_BODY_PROCESSOR },          { "external-body-processor", KW_EXTERNAL_BODY_PROCESSOR },
494          { NULL }          { NULL }
495  };  };

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

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