~ubuntu-branches/debian/sid/alpine/sid

« back to all changes in this revision

Viewing changes to pith/conftype.h

  • Committer: Package Import Robot
  • Author(s): Unit 193
  • Date: 2015-05-01 19:52:36 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20150501195236-e2xjytpbb7ik352w
Tags: 2.20+dfsg1-1
* Imported Upstream version 2.20+dfsg1
  - Drop patches applied upstream.
  - Refresh remaining patches.
  - d/rules: Update SHA256 for alpine 2.20.
* Update Standards-Version to 3.9.6.
* d/watch: Narrow the regex to only match source tarballs.
* d/alpine-doc.docs: tech-notes.txt moved to under the tech-notes/ dir.
* d/control: Update Vcs-Browser for cgit.
* d/p/10_alpine_1.10_spooldir.patch: Fix a few more references.
* d/p/40_fix_browser_hardcoded_paths.patch:
  - Fix hardcoded paths to specific browsers.
* d/p/40_fix_tech_notes_hardcoded_paths.patch, d/rules:
  - Drop patch in favor of changing paths after the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * $Id: conftype.h 1155 2008-08-21 18:33:21Z hubert@u.washington.edu $
3
3
 *
4
4
 * ========================================================================
 
5
 * Copyright 2013-2015 Eduardo Chappa
5
6
 * Copyright 2006-2008 University of Washington
6
 
 * Copyright 2013 Eduardo Chappa
7
7
 *
8
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
9
 * you may not use this file except in compliance with the License.
108
108
                , V_MARGIN
109
109
                , V_STATUS_MSG_DELAY
110
110
                , V_ACTIVE_MSG_INTERVAL
 
111
                , V_SLEEP
111
112
                , V_MAILCHECK
112
113
                , V_MAILCHECKNONCURR
113
114
                , V_MAILDROPCHECK
351
352
        F_AUTO_INCLUDE_IN_REPLY,
352
353
        F_DISABLE_CONFIG_SCREEN,
353
354
        F_DISABLE_PASSWORD_CACHING,
 
355
        F_DISABLE_PASSWORD_FILE_SAVING,
354
356
        F_DISABLE_REGEX,
355
357
        F_DISABLE_PASSWORD_CMD,
356
358
        F_DISABLE_UPDATE_CMD,
543
545
        F_SIGN_DEFAULT_ON,
544
546
        F_ENCRYPT_DEFAULT_ON,
545
547
        F_REMEMBER_SMIME_PASSPHRASE,
 
548
        F_USE_CERT_STORE_ONLY,
546
549
#ifdef  APPLEKEYCHAIN
547
550
        F_PUBLICCERTS_IN_KEYCHAIN,
548
551
#endif
669
672
 
670
673
typedef enum {Directory, Container, Keychain, Nada} SmimeHolderType;
671
674
 
 
675
typedef enum {Public, Private, CACert} WhichCerts;
 
676
 
 
677
typedef struct certdata {
 
678
  unsigned   deleted:1;         /* certificate is marked deleted             */
 
679
  unsigned   renew:1;           /* we must renew this list, set at top cert  */
 
680
  char       *date_from;        /* date from which certificate is valid      */
 
681
  char       *date_to;          /* date certificate expires                  */
 
682
  char       *md5;              /* MD5 Hash                                  */
 
683
} CertData;
 
684
 
672
685
typedef struct certlist {
673
686
    char            *name;
674
687
    void            *x509_cert;         /* this is type (X509 *) */
 
688
    CertData        data;
675
689
    struct certlist *next;
676
 
}CertList;
 
690
} CertList;
677
691
 
678
692
typedef struct smime_stuff {
679
693
    unsigned inited:1;
683
697
    unsigned entered_passphrase:1;      /* user entered a passphrase */
684
698
    unsigned already_auto_asked:1;      /* asked for passphrase automatically, not again */
685
699
    volatile char passphrase[100];      /* storage for the entered passphrase */
686
 
    char    *passphrase_emailaddr;      /* pointer to allocated storage */
 
700
    char   **passphrase_emailaddr;      /* pointer to allocated storage */
687
701
 
688
702
    /*
689
703
     * If we are using the Container type it is easiest if we
690
704
     * read in and maintain a list of certs and then write them
691
705
     * out all at once. For Directory type we just leave the data
692
 
     * in the individual files and read or write the individual
693
 
     * files when needed, so we don't have a list of all the certs.
 
706
     * in the individual files and read the list of files in the
 
707
     * directory.
694
708
     */
695
709
    SmimeHolderType publictype;
696
710
    char           *publicpath;
697
711
    char           *publiccontent;
698
712
    CertList       *publiccertlist;
 
713
    CertList       *backuppubliccertlist;
699
714
 
700
715
    SmimeHolderType privatetype;
701
716
    char           *privatepath;
702
717
    char           *privatecontent;
703
 
    void           *personal_certs;     /* this is type (PERSONAL_CERT *) */
 
718
    CertList       *privatecertlist;
 
719
    CertList       *backupprivatecertlist;
 
720
    void           *backuppersonal_certs;       /* this is type (PERSONAL_CERT *) */
 
721
    void           *personal_certs;             /* this is type (PERSONAL_CERT *) */
704
722
 
705
723
    SmimeHolderType catype;
706
724
    char           *capath;
707
725
    char           *cacontent;
 
726
    CertList       *cacertlist;
 
727
    CertList       *backupcacertlist;
708
728
 
709
729
} SMIME_STUFF_S;
710
730
 
 
731
#define BACKUPDATACERT(X) (((X) == Public ? ps_global->smime->backuppubliccertlist      \
 
732
                         : ((X) == Private ? ps_global->smime->backupprivatecertlist    \
 
733
                           : ps_global->smime->backupcacertlist)))
 
734
 
 
735
#define DATACERT(X) (((X) == Public ? ps_global->smime->publiccertlist          \
 
736
                         : ((X) == Private ? ps_global->smime->privatecertlist  \
 
737
                           : ps_global->smime->cacertlist)))
 
738
 
 
739
#define PATHCERTDIR(X) (((X) == Public ? ps_global->smime->publicpath   \
 
740
                          : ((X) == Private ? ps_global->smime->privatepath     \
 
741
                            : ((X) == CACert ? ps_global->smime->capath : NULL))))
 
742
 
 
743
#define CONTENTCERTLIST(X)      (((X) == Public ? ps_global->smime->publiccontent       \
 
744
                          : ((X) == Private ? ps_global->smime->privatecontent  \
 
745
                            : ((X) == CACert ? ps_global->smime->cacontent : NULL))))
 
746
 
 
747
#define SMHOLDERTYPE(X) (((X) == Public ? ps_global->smime->publictype  \
 
748
                          : ((X) == Private ? ps_global->smime->privatetype     \
 
749
                            : ((X) == CACert ? ps_global->smime->catype : Nada))))
 
750
 
 
751
#define EXTCERT(X)  (((X) == Public ? ".crt"            \
 
752
                          : ((X) == Private ? ".key"    \
 
753
                                : ((X) == CACert ? ".crt" : ""))))
 
754
 
 
755
#define DELETEDCERT(X)  ((X)->data.deleted)
 
756
#define RENEWCERT(X)    ((X)->data.renew)
 
757
#define DATEFROMCERT(X) ((X)->data.date_from)
 
758
#define DATETOCERT(X)   ((X)->data.date_to)
 
759
#define MD5CERT(X)      ((X)->data.md5)
 
760
 
711
761
#endif /* SMIME */
712
762
 
713
763