亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? browsertoken.cpp

?? IBE是一種非對稱密碼技術
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
    else
    {
      if (clientRequest == 1)
      {
        status = FulfillClientRequests (
          libCtx, mpIntCtx, clientStorage, 
          transportCtx, idObj, &responseData);
        if (status != 0) 
        {
          MessageBox (
          NULL, ERROR_FULFILL_CLIENT_REQUEST_MSG,
          APP_LABEL, MB_OK);
        }
        else
        {
          MessageBox (
            NULL, SUCCESS_FULFILL_CLIENT_REQUEST_MSG,
            APP_LABEL, MB_OK);
          DeleteClientRequestFile (libCtx, clientStorage, idObj);
        }
      }
    }

    /* Get a list of all the request infos for this identity
     */
    status = VoltArbitraryGetEntryHandle (
      arbitObj, (Pointer)&(responseData.id), &arbitHandle);
    if (status != 0)
      break;    

    if (arbitHandle->entryCount > 1)
    {      
      MessageBox (
        NULL, MULTIPLE_REQUEST_WARNING_MSG, APP_LABEL, MB_OK);
      printf ("\nThis may take some time. Please wait..");
    }

    storageIndex = 0;
    while (storageIndex < (arbitHandle->entryCount) )    
    {      
      deleteRequest = 0;
      status = VoltArbitraryRetrieveEntry (
        arbitObj, arbitHandle, storageIndex, (Pointer *)&getEntry);
      if (status != 0)
        break;

      /* First see if the storage location in the request info has already 
       * received the key and cert using toolkit. If yes contniue to the
       * next entry in the list.
       */
      reqStatus = GetRequestStatusForLocation (
        storeList, getEntry->storageLocation);
      if (reqStatus == STORAGE_STATUS_COMPLETED)
      {
        deleteRequest = 1;        
        goto cleanup;
      }     
      if (reqStatus == STORAGE_STATUS_FAILED)
      {
        storageIndex++;
        status = VT_ERROR_GENERAL;
        continue;
      }

      /* Find the latest request entry for a given location
       */
      for (unsigned int index2 = 1; index2 < arbitHandle->entryCount; index2++)
      {
        VoltTime seconds1, seconds2;
        VoltRequestInfoData *getEntry2;

        status = VoltArbitraryRetrieveEntry (
          arbitObj, arbitHandle, index2, (Pointer *)&getEntry2);
        if (status != 0)
          break;

        if (getEntry->storageLocation == (unsigned char *)0 || 
            getEntry2->storageLocation == (unsigned char *)0 )
        {
          if (getEntry->storageLocation != getEntry2->storageLocation)
            continue;
        }
        if (getEntry->storageLocation != (unsigned char *)0)
        {
          if (strcmp ( (const char *)getEntry->storageLocation,
            (const char *)getEntry2->storageLocation) != 0)
            continue;
        }
        status = VoltConvertTimeToSeconds (
          (VoltLibCtx *)libraryCtx, &(getEntry->requestTime), &seconds1);
        if (status != 0)
          break;
        status = VoltConvertTimeToSeconds (
          (VoltLibCtx *)libraryCtx, &(getEntry2->requestTime), &seconds2);
        if (status != 0)
          continue;
        if (seconds2 > seconds1)
          getEntry = getEntry2;
      }                 
      
      if (getEntry->storageType == VOLT_STORAGE_TYPE_TOOLKIT)
      {
        storageInfo.path = getEntry->storageLocation;
        passwordInfo.appData = (Pointer)getEntry->storageLocation;  

        /* Create a storage object to store the private key and signing certs
         * in the location specified in the request info.
         */
        status = VtCreateStorageCtx(
          libraryCtx, VtStorageImplBasic, (Pointer)0, &toolkitStorage);
        if (status != 0)
          break;
        status = VtAddStorageProvider (
          toolkitStorage, VtStorageFileWin32, (Pointer)&storageInfo);
        if (status != 0)
          break;

        /* Add the password manager to the storage ctx. Pass the location
         * in the local app data so that the password manager will not
         * ask for it again if it already has the password for that
         * location.
         */
        status = VtSetStorageParam (
          toolkitStorage, VtStorageParamPasswordManager,
          (Pointer)&passwordInfo);
        if (status != 0)
          break; 
        storageCtx = toolkitStorage;
      }
      else
      {
        passwordInfo.appData = (Pointer)0;
        storageCtx = clientStorage;      
      }
      if (status != 0)
        break;      

      /* First store the token in the appropriate location.
       */
      if (responseData.authToken != (char *)0)
      {
        status = storageCtx->StoreAuthToken (
          storageCtx, obj->district, (unsigned char *)responseData.authToken);   	
        if (status != 0)
          goto cleanup;
      }

      /* Now we need to download the key and cert for each pending request.
       * Even though private keys will be the same certs will be different
       * and currently there is no way to separate the two. So we have to
       * request both keys and certs for each pending request.
       */             
      if ( (getEntry->certRequestDER != (unsigned char *)0 ) &&
           (getEntry->certRequestDERLen != 0) )
      {
        status = VtCreateCertObject (
          libCtx, VtCertImplMpCtx, (Pointer)mpIntCtx, &signingCert);
        if (status != 0)
          break;

        /* create a cert request object and set the DER encoding from
         * request info file.
         */
        status = VtCreateCertRequestObject (
          libCtx, VtCertRequestImplMpCtx, (Pointer)mpIntCtx, &certReq);
        if (status != 0)
          break; 

        certInfo.derCoders = derCoders;
        certInfo.derCoderCount = coderCount;
        certInfo.certRequest = getEntry->certRequestDER;
        certInfo.certRequestLen = getEntry->certRequestDERLen;
        status = VtSetCertRequestParam (
          certReq, VtCertRequestParamP10Der, (Pointer)&certInfo);
        if (status != 0)
          goto cleanup;
      }

      /* Create the key Objects to hold the keys
       */
      if (getEntry->ibeKeyRequest != 0)
      {
        status = VtCreateKeyObject (
          libCtx, VtKeyImplMpCtx, (Pointer)mpIntCtx, &ibePriKey);
        if (status != 0)
          break;
      }   
      /* download the key and cert. We never build our own key pairs
       * or cert requests, so random object is not required.
       */
      status = VtDownloadIBEPrivateKeyAndCert (
        idObj, (VtPolicyCtx)0, storageCtx,
        transportCtx, certReq, signingCert, ibePriKey);
      if (status != 0)
        goto cleanup;  

      /* Now store the keys and certs we just downloaded
       */
      if (signingCert != (VtCertObject)0)
      {
        status = VtStoreEntry (
          libCtx, VT_ENTRY_TYPE_CERTIFICATE, 
          (Pointer)idObj, (Pointer)signingCert, storageCtx);
        if (status != 0)
        {
          _snprintf (
            errorString, 512, "%s%s", 
            "Couldn't store the downloaded cert to the location ",
            getStorageLocation (libCtx, getEntry->storageLocation)
            );
          MessageBox (NULL, errorString, APP_LABEL, MB_OK);   
        }
      }
      if (ibePriKey != (VtKeyObject)0)
      {
        status = VtStoreEntry (
          libCtx, VT_ENTRY_TYPE_IBE_PRI_KEY,
          (Pointer)idObj, (Pointer)ibePriKey, storageCtx);
        if (status != 0)
        {
          _snprintf (
            errorString, 512, "%s%s", 
            "Couldn't store the downloaded key to the location ",
            getStorageLocation (libCtx, getEntry->storageLocation)
            );
          MessageBox (NULL, errorString, APP_LABEL, MB_OK);  
        }
      }      

cleanup :           
      reqStatus = STORAGE_STATUS_COMPLETED;
      if (status != 0)
      {
        reqStatus = STORAGE_STATUS_FAILED; 
        storageIndex++;
        if (getEntry->storageLocation != NULL)
        {
          strncpy (
            errorString,
            "Some errors ocurred while processing the requests for..", 512);
          strncat (errorString, (const char *)getEntry->storageLocation, 512);
        }
        else
        {
          strncpy (
            errorString,
            "Some errors ocurred while processing the requests for storage", 512);
        }
        MessageBox (NULL, errorString, APP_LABEL, MB_OK);
      }
      /* Add this storage location to the list of locations that have
       * been serviced by the token handler whether successful or not.
       */
      AddLocationToCompletedList (
        &storeList, getEntry->storageLocation, reqStatus);

      VtDestroyCertRequestObject (&certReq);
      VtDestroyKeyObject (&ibePriKey);
      VtDestroyCertObject (&signingCert);
      VtDestroyStorageCtx (&toolkitStorage);     

      /* Delete the request info entry only if the request was fulfilled
       */
      if (deleteRequest == 1)
        VoltArbitraryDeleteEntry (arbitObj, arbitHandle, storageIndex) ;      
    }   

  } while (0);

  /* if we broke the loop because of an error we have to cleanup everything
  */
  VtDestroyIdentityObject (&idObj);
  VtDestroyCertRequestObject (&certReq);
  VtDestroyKeyObject (&ibePriKey);
  VtDestroyCertObject (&signingCert);   
  VtDestroyStorageCtx (&clientStorage);
  VtDestroyStorageCtx (&toolkitStorage);

  VoltArbitraryReleaseHandle (arbitObj, &arbitHandle);
  VoltDestroyArbitraryStorageObject (&arbitObj);

  if (status == 0)   
  {
    MessageBox (
    NULL, TOKEN_HANDLER_SUCCESSFUL_MSG , APP_LABEL , MB_OK);
  }

  else
  {    
    MessageBox (
      NULL, TOKEN_HANDLER_UNSUCCESSFUL_MSG, APP_LABEL, MB_OK);
  }

  if (contents != (unsigned char *)0)
    Z2Free (contents);  

  /* Close the file Handle and Delete the temporary file
   * That was passs in argv[2]
   */
  if( fileHandle != (VoltFileHandle)0 ) {
    fileCtx->CtxCloseFile(fileCtx, &fileHandle);
    fileCtx->CtxDeleteFile (fileCtx, &fileHandle, fileName);
  }

  /* Free the icServerResponseData and destroy all the contexts
  */
  FreeResponseData (&responseData, libCtx);  
  FreeCompletedLocationList (storeList);  

  /* Destroy the password manager.
   */
   PasswordManager (
     libraryCtx , (Pointer)0, PASSWORD_MGR_PURPOSE_DESTROY, 
     (unsigned char **)0, (unsigned int *)0, 
     (unsigned char **)0, (unsigned int *)0);

  VtDestroyFileCtx (&fCtx); 
  VtDestroyTransportCtx (&transportCtx);
  VtDestroyMpIntCtx (&mpIntCtx);  
  VtDestroyLibCtx (&libraryCtx);

  return 0;
}

int AddLocationToCompletedList (
  StorageStatus **storeList, 
  unsigned char *location,
  int status)
{  
  StorageStatus *temp = (StorageStatus *)0;
  unsigned char *ptr ;
  StorageStatus *node, *tempNode ;
  int len, offset, bufferSize;

  /* First see if this location already exists. If yes nothing to be done
  */
  if (*storeList != (StorageStatus *)0)
  {
    node = *storeList;
    while (node != (StorageStatus *)0 )
    {
      if (node->path == (unsigned char *)0 || location == (unsigned char *)0)
      {
        if (node->path == location)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美三级在线| 91 com成人网| 国产精品一区二区在线观看不卡| 亚洲国产精品久久久久婷婷884| 综合在线观看色| 中文字幕在线不卡视频| 国产精品乱码一区二三区小蝌蚪| 久久久久99精品国产片| 国产欧美中文在线| 一区在线观看视频| 亚洲欧美电影一区二区| 亚洲国产色一区| 五月激情六月综合| 久久机这里只有精品| 国产麻豆视频一区| 成人激情动漫在线观看| 91在线免费看| 欧美日韩极品在线观看一区| 日韩午夜激情视频| 国产精品视频第一区| 亚洲欧洲国产日韩| 亚洲成人午夜电影| 精品一区二区久久| 97精品国产露脸对白| 欧美三电影在线| 日韩久久久久久| 国产精品久久久久久久浪潮网站| 亚洲精品va在线观看| 日本欧美一区二区三区乱码| 国产成人8x视频一区二区| 色婷婷久久久久swag精品 | xnxx国产精品| 日本一区二区三区在线观看| 亚洲女同ⅹxx女同tv| 美腿丝袜一区二区三区| 粉嫩嫩av羞羞动漫久久久| 在线观看91视频| www国产成人| 亚洲午夜激情网站| 国产很黄免费观看久久| 在线观看精品一区| 久久精品亚洲麻豆av一区二区| 亚洲欧洲精品一区二区三区| 麻豆视频观看网址久久| 色综合天天性综合| 久久久亚洲精品石原莉奈| 亚洲国产一区二区a毛片| 国产91精品欧美| 日韩女优av电影| 午夜久久久影院| 91亚洲精品乱码久久久久久蜜桃| 精品美女一区二区| 亚洲第一成人在线| 99riav一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 一区二区久久久| 成人中文字幕电影| 欧美精品一区二区蜜臀亚洲| 午夜伊人狠狠久久| 99久久久久久| 国产日韩欧美亚洲| 国产一区二区三区黄视频 | 看电视剧不卡顿的网站| 色综合久久天天综合网| 久久精品免费在线观看| 久久激情综合网| 日韩欧美在线1卡| 视频精品一区二区| 欧美视频一区二区三区四区| 中文字幕一区二区三区色视频 | 亚洲.国产.中文慕字在线| 粉嫩av亚洲一区二区图片| 精品国产91洋老外米糕| 日本美女一区二区三区| 欧美久久久久久久久| 一区二区成人在线| 在线免费一区三区| 亚洲伊人色欲综合网| 色哟哟国产精品免费观看| 国产精品进线69影院| 9色porny自拍视频一区二区| 国产精品萝li| 91丨国产丨九色丨pron| 亚洲精品免费在线观看| 91国偷自产一区二区三区观看| 一区二区在线观看视频| 在线观看一区二区视频| 亚洲国产一二三| 在线播放日韩导航| 蜜臀a∨国产成人精品| 日韩美女天天操| 丁香六月综合激情| 亚洲免费观看高清完整版在线 | 亚洲高清不卡在线观看| 欧美一区二区精品| 国产精品白丝av| 中文字幕二三区不卡| 一本久久综合亚洲鲁鲁五月天 | 中文字幕亚洲区| 在线免费观看成人短视频| 日本不卡的三区四区五区| 久久久亚洲综合| 色94色欧美sute亚洲线路一久| 亚洲成av人片www| xfplay精品久久| 99九九99九九九视频精品| 一区二区不卡在线播放 | 依依成人精品视频| 91麻豆精品国产91久久久更新时间| 久久99蜜桃精品| **欧美大码日韩| 日韩三级免费观看| av网站一区二区三区| 天天色综合天天| 国产精品国产精品国产专区不片| 欧美丝袜第三区| 国产成人亚洲综合色影视| 一区二区成人在线观看| 国产亚洲欧美一区在线观看| 欧美在线一二三| 国产69精品久久久久毛片| 亚洲电影在线播放| 国产欧美日韩不卡免费| 91精品国产美女浴室洗澡无遮挡| 国产传媒久久文化传媒| 日韩激情在线观看| 亚洲欧洲制服丝袜| 中文字幕成人av| 精品国产一区二区三区不卡 | 97久久超碰国产精品电影| 久久精品免费观看| 亚洲综合一区二区| 国产精品三级视频| 精品粉嫩超白一线天av| 91黄色免费网站| 99精品久久免费看蜜臀剧情介绍| 国产一区免费电影| 久久99在线观看| 青青国产91久久久久久| 亚洲午夜久久久久久久久电影网| 国产精品国产三级国产普通话三级 | 国产精品一区久久久久| 免费在线观看一区| 性久久久久久久久久久久| 亚洲激情一二三区| 亚洲精品高清视频在线观看| 亚洲国产精品黑人久久久| 日本一区二区三区久久久久久久久不 | 欧美网站大全在线观看| 一本久道中文字幕精品亚洲嫩| 成人动漫av在线| 成人免费观看av| 国产成人99久久亚洲综合精品| 国产一区二区女| 国产精品一二三在| 国产精品羞羞答答xxdd| 国产真实乱偷精品视频免| 精品综合免费视频观看| 韩国毛片一区二区三区| 国产一区二区中文字幕| 国产精品亚洲一区二区三区在线| 国产精品77777竹菊影视小说| 国产一区二区视频在线播放| 国产一区二区三区四区五区入口| 狠狠色丁香久久婷婷综合_中 | 亚洲欧美一区二区不卡| 国产精品白丝在线| 亚洲三级小视频| 亚洲国产毛片aaaaa无费看| 一个色综合网站| 天堂蜜桃91精品| 久久综合综合久久综合| 国产高清不卡二三区| 91麻豆精东视频| 欧美日韩在线播放| 日韩欧美中文一区| 欧美国产日韩一二三区| 亚洲免费观看高清完整版在线观看熊 | 亚洲一区二区偷拍精品| 丝袜美腿成人在线| 国产成人在线影院 | 依依成人综合视频| 青青草国产成人av片免费| 国产精品一区二区在线播放| 91色视频在线| 日韩色在线观看| 国产精品美女一区二区三区| 亚洲精品国产一区二区三区四区在线| 亚洲国产精品久久久久婷婷884| 久久精品国产秦先生| 99精品黄色片免费大全| 在线播放日韩导航| 成人欧美一区二区三区小说| 天堂资源在线中文精品| av一区二区久久| wwwwww.欧美系列| 亚洲一区在线观看免费观看电影高清| 久久99国产精品免费| 色香蕉久久蜜桃| 久久精品在这里|