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 _CMMFIT_H_ michael@0: #define _CMMFIT_H_ michael@0: michael@0: /* michael@0: * All fields marked by a PKIStausInfo in comments is an integer michael@0: * with the following possible values. michael@0: * michael@0: * Integer Value Meaning michael@0: * ------------- ------- michael@0: * 0 granted- got exactly what you asked for. michael@0: * michael@0: * 1 grantedWithMods-got something like what you asked michael@0: * for;requester is responsible for ascertainging the michael@0: * differences. michael@0: * michael@0: * 2 rejection-you don't get what you asked for; more michael@0: * information elsewhere in the message michael@0: * michael@0: * 3 waiting-the request body part has not yet been michael@0: * processed, expect to hear more later. michael@0: * michael@0: * 4 revocationWarning-this message contains a warning michael@0: * that a revocation is imminent. michael@0: * michael@0: * 5 revocationNotification-notification that a michael@0: * revocation has occurred. michael@0: * michael@0: * 6 keyUpdateWarning-update already done for the michael@0: * oldCertId specified in FullCertTemplate. michael@0: */ michael@0: michael@0: struct CMMFPKIStatusInfoStr { michael@0: SECItem status; michael@0: SECItem statusString; michael@0: SECItem failInfo; michael@0: }; michael@0: michael@0: struct CMMFCertOrEncCertStr { michael@0: union { michael@0: CERTCertificate *certificate; michael@0: CRMFEncryptedValue *encryptedCert; michael@0: } cert; michael@0: CMMFCertOrEncCertChoice choice; michael@0: SECItem derValue; michael@0: }; michael@0: michael@0: struct CMMFCertifiedKeyPairStr { michael@0: CMMFCertOrEncCert certOrEncCert; michael@0: CRMFEncryptedValue *privateKey; michael@0: SECItem derPublicationInfo; /* We aren't creating michael@0: * PKIPublicationInfo's, so michael@0: * we'll store away the der michael@0: * here if we decode one that michael@0: * does have pubInfo. michael@0: */ michael@0: SECItem unwrappedPrivKey; michael@0: }; michael@0: michael@0: struct CMMFCertResponseStr { michael@0: SECItem certReqId; michael@0: CMMFPKIStatusInfo status; /*PKIStatusInfo*/ michael@0: CMMFCertifiedKeyPair *certifiedKeyPair; michael@0: }; michael@0: michael@0: struct CMMFCertRepContentStr { michael@0: CERTCertificate **caPubs; michael@0: CMMFCertResponse **response; michael@0: PLArenaPool *poolp; michael@0: PRBool isDecoded; michael@0: }; michael@0: michael@0: struct CMMFChallengeStr { michael@0: SECAlgorithmID *owf; michael@0: SECItem witness; michael@0: SECItem senderDER; michael@0: SECItem key; michael@0: SECItem challenge; michael@0: SECItem randomNumber; michael@0: }; michael@0: michael@0: struct CMMFRandStr { michael@0: SECItem integer; michael@0: SECItem senderHash; michael@0: CERTGeneralName *sender; michael@0: }; michael@0: michael@0: struct CMMFPOPODecKeyChallContentStr { michael@0: CMMFChallenge **challenges; michael@0: PLArenaPool *poolp; michael@0: int numChallenges; michael@0: int numAllocated; michael@0: }; michael@0: michael@0: struct CMMFPOPODecKeyRespContentStr { michael@0: SECItem **responses; michael@0: PLArenaPool *poolp; michael@0: }; michael@0: michael@0: struct CMMFKeyRecRepContentStr { michael@0: CMMFPKIStatusInfo status; /* PKIStatusInfo */ michael@0: CERTCertificate *newSigCert; michael@0: CERTCertificate **caCerts; michael@0: CMMFCertifiedKeyPair **keyPairHist; michael@0: PLArenaPool *poolp; michael@0: int numKeyPairs; michael@0: int allocKeyPairs; michael@0: PRBool isDecoded; michael@0: }; michael@0: michael@0: #endif /* _CMMFIT_H_ */ michael@0: