michael@0: /* -*- Mode: C; tab-width: 8 -*-*/ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _CMMFT_H_ michael@0: #define _CMMFT_H_ michael@0: michael@0: #include "secasn1.h" michael@0: michael@0: /* michael@0: * These are the enumerations used to distinguish between the different michael@0: * choices available for the CMMFCertOrEncCert structure. michael@0: */ michael@0: typedef enum { michael@0: cmmfNoCertOrEncCert = 0, michael@0: cmmfCertificate = 1, michael@0: cmmfEncryptedCert = 2 michael@0: } CMMFCertOrEncCertChoice; michael@0: michael@0: /* michael@0: * This is the enumeration and the corresponding values used to michael@0: * represent the CMMF type PKIStatus michael@0: */ michael@0: typedef enum { michael@0: cmmfNoPKIStatus = -1, michael@0: cmmfGranted = 0, michael@0: cmmfGrantedWithMods = 1, michael@0: cmmfRejection = 2, michael@0: cmmfWaiting = 3, michael@0: cmmfRevocationWarning = 4, michael@0: cmmfRevocationNotification = 5, michael@0: cmmfKeyUpdateWarning = 6, michael@0: cmmfNumPKIStatus michael@0: } CMMFPKIStatus; michael@0: michael@0: /* michael@0: * These enumerations are used to represent the corresponding values michael@0: * in PKIFailureInfo defined in CMMF. michael@0: */ michael@0: typedef enum { michael@0: cmmfBadAlg = 0, michael@0: cmmfBadMessageCheck = 1, michael@0: cmmfBadRequest = 2, michael@0: cmmfBadTime = 3, michael@0: cmmfBadCertId = 4, michael@0: cmmfBadDataFormat = 5, michael@0: cmmfWrongAuthority = 6, michael@0: cmmfIncorrectData = 7, michael@0: cmmfMissingTimeStamp = 8, michael@0: cmmfNoFailureInfo = 9 michael@0: } CMMFPKIFailureInfo; michael@0: michael@0: typedef struct CMMFPKIStatusInfoStr CMMFPKIStatusInfo; michael@0: typedef struct CMMFCertOrEncCertStr CMMFCertOrEncCert; michael@0: typedef struct CMMFCertifiedKeyPairStr CMMFCertifiedKeyPair; michael@0: typedef struct CMMFCertResponseStr CMMFCertResponse; michael@0: typedef struct CMMFCertResponseSeqStr CMMFCertResponseSeq; michael@0: typedef struct CMMFPOPODecKeyChallContentStr CMMFPOPODecKeyChallContent; michael@0: typedef struct CMMFChallengeStr CMMFChallenge; michael@0: typedef struct CMMFRandStr CMMFRand; michael@0: typedef struct CMMFPOPODecKeyRespContentStr CMMFPOPODecKeyRespContent; michael@0: typedef struct CMMFKeyRecRepContentStr CMMFKeyRecRepContent; michael@0: typedef struct CMMFCertRepContentStr CMMFCertRepContent; michael@0: michael@0: /* Export this so people can call SEC_ASN1EncodeItem instead of having to michael@0: * write callbacks that are passed in to the high level encode function michael@0: * for CMMFCertRepContent. michael@0: */ michael@0: extern const SEC_ASN1Template CMMFCertRepContentTemplate[]; michael@0: extern const SEC_ASN1Template CMMFPOPODecKeyChallContentTemplate[]; michael@0: michael@0: #endif /*_CMMFT_H_*/