security/nss/lib/crmf/cmmft.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C; tab-width: 8 -*-*/
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef _CMMFT_H_
     7 #define _CMMFT_H_
     9 #include "secasn1.h"
    11 /*
    12  * These are the enumerations used to distinguish between the different
    13  * choices available for the CMMFCertOrEncCert structure.
    14  */
    15 typedef enum {
    16     cmmfNoCertOrEncCert = 0,
    17     cmmfCertificate = 1,
    18     cmmfEncryptedCert = 2
    19 } CMMFCertOrEncCertChoice;
    21 /*
    22  * This is the enumeration and the corresponding values used to 
    23  * represent the CMMF type PKIStatus
    24  */
    25 typedef enum {
    26     cmmfNoPKIStatus = -1,
    27     cmmfGranted = 0,
    28     cmmfGrantedWithMods = 1,
    29     cmmfRejection = 2,
    30     cmmfWaiting = 3,
    31     cmmfRevocationWarning = 4,
    32     cmmfRevocationNotification = 5,
    33     cmmfKeyUpdateWarning = 6,
    34     cmmfNumPKIStatus
    35 } CMMFPKIStatus;
    37 /*
    38  * These enumerations are used to represent the corresponding values
    39  * in PKIFailureInfo defined in CMMF.
    40  */
    41 typedef enum {
    42     cmmfBadAlg = 0,
    43     cmmfBadMessageCheck = 1,
    44     cmmfBadRequest = 2,
    45     cmmfBadTime = 3,
    46     cmmfBadCertId = 4,
    47     cmmfBadDataFormat = 5,
    48     cmmfWrongAuthority = 6,
    49     cmmfIncorrectData = 7,
    50     cmmfMissingTimeStamp = 8,
    51     cmmfNoFailureInfo = 9
    52 } CMMFPKIFailureInfo;
    54 typedef struct CMMFPKIStatusInfoStr          CMMFPKIStatusInfo;
    55 typedef struct CMMFCertOrEncCertStr          CMMFCertOrEncCert;
    56 typedef struct CMMFCertifiedKeyPairStr       CMMFCertifiedKeyPair;
    57 typedef struct CMMFCertResponseStr           CMMFCertResponse;
    58 typedef struct CMMFCertResponseSeqStr        CMMFCertResponseSeq;
    59 typedef struct CMMFPOPODecKeyChallContentStr CMMFPOPODecKeyChallContent;
    60 typedef struct CMMFChallengeStr              CMMFChallenge;
    61 typedef struct CMMFRandStr                   CMMFRand;
    62 typedef struct CMMFPOPODecKeyRespContentStr  CMMFPOPODecKeyRespContent;
    63 typedef struct CMMFKeyRecRepContentStr       CMMFKeyRecRepContent;
    64 typedef struct CMMFCertRepContentStr         CMMFCertRepContent;
    66 /* Export this so people can call SEC_ASN1EncodeItem instead of having to 
    67  * write callbacks that are passed in to the high level encode function
    68  * for CMMFCertRepContent.
    69  */
    70 extern const SEC_ASN1Template CMMFCertRepContentTemplate[];
    71 extern const SEC_ASN1Template CMMFPOPODecKeyChallContentTemplate[];
    73 #endif /*_CMMFT_H_*/

mercurial