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

mercurial