1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/lib/crmf/cmmft.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,73 @@ 1.4 +/* -*- Mode: C; tab-width: 8 -*-*/ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef _CMMFT_H_ 1.10 +#define _CMMFT_H_ 1.11 + 1.12 +#include "secasn1.h" 1.13 + 1.14 +/* 1.15 + * These are the enumerations used to distinguish between the different 1.16 + * choices available for the CMMFCertOrEncCert structure. 1.17 + */ 1.18 +typedef enum { 1.19 + cmmfNoCertOrEncCert = 0, 1.20 + cmmfCertificate = 1, 1.21 + cmmfEncryptedCert = 2 1.22 +} CMMFCertOrEncCertChoice; 1.23 + 1.24 +/* 1.25 + * This is the enumeration and the corresponding values used to 1.26 + * represent the CMMF type PKIStatus 1.27 + */ 1.28 +typedef enum { 1.29 + cmmfNoPKIStatus = -1, 1.30 + cmmfGranted = 0, 1.31 + cmmfGrantedWithMods = 1, 1.32 + cmmfRejection = 2, 1.33 + cmmfWaiting = 3, 1.34 + cmmfRevocationWarning = 4, 1.35 + cmmfRevocationNotification = 5, 1.36 + cmmfKeyUpdateWarning = 6, 1.37 + cmmfNumPKIStatus 1.38 +} CMMFPKIStatus; 1.39 + 1.40 +/* 1.41 + * These enumerations are used to represent the corresponding values 1.42 + * in PKIFailureInfo defined in CMMF. 1.43 + */ 1.44 +typedef enum { 1.45 + cmmfBadAlg = 0, 1.46 + cmmfBadMessageCheck = 1, 1.47 + cmmfBadRequest = 2, 1.48 + cmmfBadTime = 3, 1.49 + cmmfBadCertId = 4, 1.50 + cmmfBadDataFormat = 5, 1.51 + cmmfWrongAuthority = 6, 1.52 + cmmfIncorrectData = 7, 1.53 + cmmfMissingTimeStamp = 8, 1.54 + cmmfNoFailureInfo = 9 1.55 +} CMMFPKIFailureInfo; 1.56 + 1.57 +typedef struct CMMFPKIStatusInfoStr CMMFPKIStatusInfo; 1.58 +typedef struct CMMFCertOrEncCertStr CMMFCertOrEncCert; 1.59 +typedef struct CMMFCertifiedKeyPairStr CMMFCertifiedKeyPair; 1.60 +typedef struct CMMFCertResponseStr CMMFCertResponse; 1.61 +typedef struct CMMFCertResponseSeqStr CMMFCertResponseSeq; 1.62 +typedef struct CMMFPOPODecKeyChallContentStr CMMFPOPODecKeyChallContent; 1.63 +typedef struct CMMFChallengeStr CMMFChallenge; 1.64 +typedef struct CMMFRandStr CMMFRand; 1.65 +typedef struct CMMFPOPODecKeyRespContentStr CMMFPOPODecKeyRespContent; 1.66 +typedef struct CMMFKeyRecRepContentStr CMMFKeyRecRepContent; 1.67 +typedef struct CMMFCertRepContentStr CMMFCertRepContent; 1.68 + 1.69 +/* Export this so people can call SEC_ASN1EncodeItem instead of having to 1.70 + * write callbacks that are passed in to the high level encode function 1.71 + * for CMMFCertRepContent. 1.72 + */ 1.73 +extern const SEC_ASN1Template CMMFCertRepContentTemplate[]; 1.74 +extern const SEC_ASN1Template CMMFPOPODecKeyChallContentTemplate[]; 1.75 + 1.76 +#endif /*_CMMFT_H_*/