omadrm/drmengine/roap/src/JoinDomainReq.cpp
branchRCL_3
changeset 18 8a03a285ab14
parent 0 95b198f216e5
equal deleted inserted replaced
17:e16d72588c28 18:8a03a285ab14
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <e32std.h>
    21 #include <e32std.h>
    22 #include "base64.h"
    22 #include "Base64.h"
    23 #include "JoinDomainReq.h"
    23 #include "JoinDomainReq.h"
    24 #include "RoapDef.h"
    24 #include "RoapDef.h"
    25 
    25 
    26 using namespace Roap;
    26 using namespace Roap;
    27 
    27 
    98 // -----------------------------------------------------------------------------
    98 // -----------------------------------------------------------------------------
    99 //
    99 //
   100 CJoinDomainReq* CJoinDomainReq::NewL()
   100 CJoinDomainReq* CJoinDomainReq::NewL()
   101     {
   101     {
   102     CJoinDomainReq* self = new( ELeave ) CJoinDomainReq;
   102     CJoinDomainReq* self = new( ELeave ) CJoinDomainReq;
   103     
   103 
   104     CleanupStack::PushL( self );
   104     CleanupStack::PushL( self );
   105     self->ConstructL();
   105     self->ConstructL();
   106     CleanupStack::Pop();
   106     CleanupStack::Pop();
   107 
   107 
   108     return self;
   108     return self;
   109     }
   109     }
   110 
   110 
   111     
   111 
   112 // Destructor
   112 // Destructor
   113 CJoinDomainReq::~CJoinDomainReq()
   113 CJoinDomainReq::~CJoinDomainReq()
   114     {
   114     {
   115     iCertificateChain.ResetAndDestroy();
   115     iCertificateChain.ResetAndDestroy();
   116     delete iDomainId;
   116     delete iDomainId;
   172             BufAppendBase64L(b, *iCertificateChain[i]);
   172             BufAppendBase64L(b, *iCertificateChain[i]);
   173             BufAppendL(b, KReqCertEnd);
   173             BufAppendL(b, KReqCertEnd);
   174             }
   174             }
   175         BufAppendL(b, KReqCertChainEnd);
   175         BufAppendL(b, KReqCertChainEnd);
   176         }
   176         }
   177         
   177 
   178     if (iPeerKeyIdentifier.Length() ||
   178     if (iPeerKeyIdentifier.Length() ||
   179         iOcspResponderKeyId ||
   179         iOcspResponderKeyId ||
   180         iOcspInfoStored ||
   180         iOcspInfoStored ||
   181         iHashChainSupport)
   181         iHashChainSupport)
   182         {
   182         {
   183         BufAppendL(b, KReqExtensions);
   183         BufAppendL(b, KReqExtensions);
   184         }
   184         }
   185         
   185 
   186     if (iPeerKeyIdentifier.Length())
   186     if (iPeerKeyIdentifier.Length())
   187         {
   187         {
   188         BufAppendL(b, KReqPeerKey);
   188         BufAppendL(b, KReqPeerKey);
   189         BufAppendBase64L(b, iPeerKeyIdentifier);
   189         BufAppendBase64L(b, iPeerKeyIdentifier);
   190         BufAppendL(b, KReqPeerKeyEnd);
   190         BufAppendL(b, KReqPeerKeyEnd);
   191         }
   191         }
   192         
   192 
   193     if (iOcspInfoStored)
   193     if (iOcspInfoStored)
   194         {
   194         {
   195         BufAppendL(b, KReqNoOcspResponse);
   195         BufAppendL(b, KReqNoOcspResponse);
   196         }
   196         }
   197         
   197 
   198     if (iOcspResponderKeyId)
   198     if (iOcspResponderKeyId)
   199         {
   199         {
   200         BufAppendL(b, KReqOcspResponderKeyId);
   200         BufAppendL(b, KReqOcspResponderKeyId);
   201         BufAppendBase64L(b, *iOcspResponderKeyId);
   201         BufAppendBase64L(b, *iOcspResponderKeyId);
   202         BufAppendL(b, KReqOcspResponderKeyIdEnd);
   202         BufAppendL(b, KReqOcspResponderKeyIdEnd);
   204 
   204 
   205     if (iHashChainSupport)
   205     if (iHashChainSupport)
   206         {
   206         {
   207         BufAppendL(b, KReqHashChainSupport);
   207         BufAppendL(b, KReqHashChainSupport);
   208         }
   208         }
   209                
   209 
   210     if (iPeerKeyIdentifier.Length() ||
   210     if (iPeerKeyIdentifier.Length() ||
   211         iOcspResponderKeyId ||
   211         iOcspResponderKeyId ||
   212         iOcspInfoStored ||
   212         iOcspInfoStored ||
   213         iHashChainSupport)
   213         iHashChainSupport)
   214         {
   214         {