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

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

mercurial