Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 _CMMFIT_H_
7 #define _CMMFIT_H_
9 /*
10 * All fields marked by a PKIStausInfo in comments is an integer
11 * with the following possible values.
12 *
13 * Integer Value Meaning
14 * ------------- -------
15 * 0 granted- got exactly what you asked for.
16 *
17 * 1 grantedWithMods-got something like what you asked
18 * for;requester is responsible for ascertainging the
19 * differences.
20 *
21 * 2 rejection-you don't get what you asked for; more
22 * information elsewhere in the message
23 *
24 * 3 waiting-the request body part has not yet been
25 * processed, expect to hear more later.
26 *
27 * 4 revocationWarning-this message contains a warning
28 * that a revocation is imminent.
29 *
30 * 5 revocationNotification-notification that a
31 * revocation has occurred.
32 *
33 * 6 keyUpdateWarning-update already done for the
34 * oldCertId specified in FullCertTemplate.
35 */
37 struct CMMFPKIStatusInfoStr {
38 SECItem status;
39 SECItem statusString;
40 SECItem failInfo;
41 };
43 struct CMMFCertOrEncCertStr {
44 union {
45 CERTCertificate *certificate;
46 CRMFEncryptedValue *encryptedCert;
47 } cert;
48 CMMFCertOrEncCertChoice choice;
49 SECItem derValue;
50 };
52 struct CMMFCertifiedKeyPairStr {
53 CMMFCertOrEncCert certOrEncCert;
54 CRMFEncryptedValue *privateKey;
55 SECItem derPublicationInfo; /* We aren't creating
56 * PKIPublicationInfo's, so
57 * we'll store away the der
58 * here if we decode one that
59 * does have pubInfo.
60 */
61 SECItem unwrappedPrivKey;
62 };
64 struct CMMFCertResponseStr {
65 SECItem certReqId;
66 CMMFPKIStatusInfo status; /*PKIStatusInfo*/
67 CMMFCertifiedKeyPair *certifiedKeyPair;
68 };
70 struct CMMFCertRepContentStr {
71 CERTCertificate **caPubs;
72 CMMFCertResponse **response;
73 PLArenaPool *poolp;
74 PRBool isDecoded;
75 };
77 struct CMMFChallengeStr {
78 SECAlgorithmID *owf;
79 SECItem witness;
80 SECItem senderDER;
81 SECItem key;
82 SECItem challenge;
83 SECItem randomNumber;
84 };
86 struct CMMFRandStr {
87 SECItem integer;
88 SECItem senderHash;
89 CERTGeneralName *sender;
90 };
92 struct CMMFPOPODecKeyChallContentStr {
93 CMMFChallenge **challenges;
94 PLArenaPool *poolp;
95 int numChallenges;
96 int numAllocated;
97 };
99 struct CMMFPOPODecKeyRespContentStr {
100 SECItem **responses;
101 PLArenaPool *poolp;
102 };
104 struct CMMFKeyRecRepContentStr {
105 CMMFPKIStatusInfo status; /* PKIStatusInfo */
106 CERTCertificate *newSigCert;
107 CERTCertificate **caCerts;
108 CMMFCertifiedKeyPair **keyPairHist;
109 PLArenaPool *poolp;
110 int numKeyPairs;
111 int allocKeyPairs;
112 PRBool isDecoded;
113 };
115 #endif /* _CMMFIT_H_ */