security/nss/lib/crmf/cmmfit.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/crmf/cmmfit.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,116 @@
     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 _CMMFIT_H_
    1.10 +#define _CMMFIT_H_
    1.11 +
    1.12 +/*
    1.13 + * All fields marked by a PKIStausInfo in comments is an integer
    1.14 + * with the following possible values.
    1.15 + *
    1.16 + *  Integer Value          Meaning
    1.17 + *  -------------          -------
    1.18 + *         0               granted- got exactly what you asked for.
    1.19 + *
    1.20 + *         1               grantedWithMods-got something like what you asked 
    1.21 + *                          for;requester is responsible for ascertainging the
    1.22 + *                          differences.
    1.23 + *
    1.24 + *         2               rejection-you don't get what you asked for; more 
    1.25 + *                          information elsewhere in the message
    1.26 + *
    1.27 + *         3               waiting-the request body part has not yet been 
    1.28 + *                          processed, expect to hear more later.
    1.29 + *
    1.30 + *         4               revocationWarning-this message contains a warning 
    1.31 + *                          that a revocation is imminent.
    1.32 + *
    1.33 + *         5               revocationNotification-notification that a 
    1.34 + *                          revocation has occurred.
    1.35 + *
    1.36 + *         6               keyUpdateWarning-update already done for the 
    1.37 + *                          oldCertId specified in FullCertTemplate.
    1.38 + */
    1.39 +
    1.40 +struct CMMFPKIStatusInfoStr {
    1.41 +    SECItem status;
    1.42 +    SECItem statusString;
    1.43 +    SECItem failInfo;
    1.44 +};
    1.45 +
    1.46 +struct CMMFCertOrEncCertStr {
    1.47 +    union { 
    1.48 +        CERTCertificate    *certificate;
    1.49 +        CRMFEncryptedValue *encryptedCert;
    1.50 +    } cert;
    1.51 +    CMMFCertOrEncCertChoice choice;
    1.52 +    SECItem                 derValue;
    1.53 +};
    1.54 +
    1.55 +struct CMMFCertifiedKeyPairStr {
    1.56 +    CMMFCertOrEncCert   certOrEncCert;
    1.57 +    CRMFEncryptedValue *privateKey;
    1.58 +    SECItem             derPublicationInfo; /* We aren't creating 
    1.59 +					     * PKIPublicationInfo's, so 
    1.60 +					     * we'll store away the der 
    1.61 +					     * here if we decode one that
    1.62 +					     * does have pubInfo.
    1.63 +					     */
    1.64 +    SECItem unwrappedPrivKey;
    1.65 +};
    1.66 +
    1.67 +struct CMMFCertResponseStr {
    1.68 +    SECItem               certReqId;
    1.69 +    CMMFPKIStatusInfo     status; /*PKIStatusInfo*/
    1.70 +    CMMFCertifiedKeyPair *certifiedKeyPair;
    1.71 +};
    1.72 +
    1.73 +struct CMMFCertRepContentStr {
    1.74 +    CERTCertificate  **caPubs;
    1.75 +    CMMFCertResponse **response;
    1.76 +    PLArenaPool       *poolp;
    1.77 +    PRBool             isDecoded;
    1.78 +};
    1.79 +
    1.80 +struct CMMFChallengeStr {
    1.81 +    SECAlgorithmID  *owf;
    1.82 +    SECItem          witness;
    1.83 +    SECItem          senderDER;
    1.84 +    SECItem          key;
    1.85 +    SECItem          challenge;
    1.86 +    SECItem          randomNumber;
    1.87 +};
    1.88 +
    1.89 +struct CMMFRandStr {
    1.90 +    SECItem          integer;
    1.91 +    SECItem          senderHash;
    1.92 +    CERTGeneralName *sender;
    1.93 +};
    1.94 +
    1.95 +struct CMMFPOPODecKeyChallContentStr {
    1.96 +    CMMFChallenge **challenges;
    1.97 +    PLArenaPool    *poolp;
    1.98 +    int             numChallenges;
    1.99 +    int             numAllocated;
   1.100 +};
   1.101 +
   1.102 +struct CMMFPOPODecKeyRespContentStr {
   1.103 +    SECItem     **responses;
   1.104 +    PLArenaPool  *poolp;
   1.105 +};
   1.106 +
   1.107 +struct CMMFKeyRecRepContentStr {
   1.108 +    CMMFPKIStatusInfo      status; /* PKIStatusInfo */
   1.109 +    CERTCertificate       *newSigCert;
   1.110 +    CERTCertificate      **caCerts;
   1.111 +    CMMFCertifiedKeyPair **keyPairHist;
   1.112 +    PLArenaPool           *poolp;
   1.113 +    int                    numKeyPairs;
   1.114 +    int                    allocKeyPairs;
   1.115 +    PRBool                 isDecoded;
   1.116 +};
   1.117 +
   1.118 +#endif /* _CMMFIT_H_ */
   1.119 +

mercurial