Back to index

lightning-sunbird  0.9+nobinonly
cmmfit.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 8 -*-*/
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Netscape security libraries.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef _CMMFIT_H_
00039 #define _CMMFIT_H_
00040 
00041 /*
00042  * All fields marked by a PKIStausInfo in comments is an integer
00043  * with the following possible values.
00044  *
00045  *  Integer Value          Meaning
00046  *  -------------          -------
00047  *         0               granted- got exactly what you asked for.
00048  *
00049  *         1               grantedWithMods-got something like what you asked 
00050  *                          for;requester is responsible for ascertainging the
00051  *                          differences.
00052  *
00053  *         2               rejection-you don't get what you asked for; more 
00054  *                          information elsewhere in the message
00055  *
00056  *         3               waiting-the request body part has not yet been 
00057  *                          processed, expect to hear more later.
00058  *
00059  *         4               revocationWarning-this message contains a warning 
00060  *                          that a revocation is imminent.
00061  *
00062  *         5               revocationNotification-notification that a 
00063  *                          revocation has occurred.
00064  *
00065  *         6               keyUpdateWarning-update already done for the 
00066  *                          oldCertId specified in FullCertTemplate.
00067  */
00068 
00069 struct CMMFPKIStatusInfoStr {
00070     SECItem status;
00071     SECItem statusString;
00072     SECItem failInfo;
00073 };
00074 
00075 struct CMMFCertOrEncCertStr {
00076     union { 
00077         CERTCertificate    *certificate;
00078         CRMFEncryptedValue *encryptedCert;
00079     } cert;
00080     CMMFCertOrEncCertChoice choice;
00081     SECItem                 derValue;
00082 };
00083 
00084 struct CMMFCertifiedKeyPairStr {
00085     CMMFCertOrEncCert   certOrEncCert;
00086     CRMFEncryptedValue *privateKey;
00087     SECItem             derPublicationInfo; /* We aren't creating 
00088                                         * PKIPublicationInfo's, so 
00089                                         * we'll store away the der 
00090                                         * here if we decode one that
00091                                         * does have pubInfo.
00092                                         */
00093     SECItem unwrappedPrivKey;
00094 };
00095 
00096 struct CMMFCertResponseStr {
00097     SECItem               certReqId;
00098     CMMFPKIStatusInfo     status; /*PKIStatusInfo*/
00099     CMMFCertifiedKeyPair *certifiedKeyPair;
00100 };
00101 
00102 struct CMMFCertRepContentStr {
00103     CERTCertificate  **caPubs;
00104     CMMFCertResponse **response;
00105     PRArenaPool       *poolp;
00106     PRBool             isDecoded;
00107 };
00108 
00109 struct CMMFChallengeStr {
00110     SECAlgorithmID  *owf;
00111     SECItem          witness;
00112     SECItem          senderDER;
00113     SECItem          key;
00114     SECItem          challenge;
00115     SECItem          randomNumber;
00116 };
00117 
00118 struct CMMFRandStr {
00119     SECItem          integer;
00120     SECItem          senderHash;
00121     CERTGeneralName *sender;
00122 };
00123 
00124 struct CMMFPOPODecKeyChallContentStr {
00125     CMMFChallenge **challenges;
00126     PRArenaPool    *poolp;
00127     int             numChallenges;
00128     int             numAllocated;
00129 };
00130 
00131 struct CMMFPOPODecKeyRespContentStr {
00132     SECItem     **responses;
00133     PRArenaPool  *poolp;
00134 };
00135 
00136 struct CMMFKeyRecRepContentStr {
00137     CMMFPKIStatusInfo      status; /* PKIStatusInfo */
00138     CERTCertificate       *newSigCert;
00139     CERTCertificate      **caCerts;
00140     CMMFCertifiedKeyPair **keyPairHist;
00141     PRArenaPool           *poolp;
00142     int                    numKeyPairs;
00143     int                    allocKeyPairs;
00144     PRBool                 isDecoded;
00145 };
00146 
00147 #endif /* _CMMFIT_H_ */
00148