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

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

?? smwrite.c

?? IBE是一種非對稱密碼技術
?? C
?? 第 1 頁 / 共 4 頁
字號:
         index <= VOLT_WRITE_SM_FOOT_INDEX_END; ++index)
    {
      /* Add in the length of the actual data to write out.
       * If there is data to write out, add a newLine.
       */
      elementLen = writeCtx->itemArray[index].len;
      if (elementLen == 0)
        continue;

      Z2Memcpy (
        message + offset, writeCtx->itemArray[index].data, elementLen);
      offset += elementLen;
      Z2Memcpy (message + offset, newLine, newLineLen);
      offset += newLineLen;
    }

    obj->inputLen += inputDataLen;
    obj->state = VOLT_SECURE_MAIL_STATE_WRITE_FINAL;

  } while (0);

  if (sBuffer != (unsigned char *)0)
    Z2Free (sBuffer);
  if (eBuffer != (unsigned char *)0)
    Z2Free (eBuffer);

  VOLT_LOG_ERROR_INFO_COMPARE (
    status, 0, secureMailObj, status, 0, errorType,
    (char *)0, "VoltSecureMailWriteFinal", fnctLine, (char *)0)

  return (status);
}

#define VOLT_CONTENT_TYPE_LABEL        "content-type: "
#define VOLT_CONTENT_TYPE_LABEL_LEN    14
#define VOLT_CONTENT_LENGTH_LABEL      "content-length: "
#define VOLT_CONTENT_LENGTH_LABEL_LEN  16
#define VOLT_FILE_NAME_LABEL           "file-name="
#define VOLT_FILE_NAME_LABEL_LEN       10
#define VOLT_CONTENT_ZDR_UTC           "ZDR-Utc: "
#define VOLT_CONTENT_ZDR_UTC_LEN       9
#define VOLT_CONTENT_ZDR_FROM          "ZDR-From: "
#define VOLT_CONTENT_ZDR_FROM_LEN      10
#define VOLT_CONTENT_ZDR_TO            "ZDR-To: "
#define VOLT_CONTENT_ZDR_TO_LEN        8
#define VOLT_CONTENT_ZDR_SUBJECT       "ZDR-Subject: "
#define VOLT_CONTENT_ZDR_SUBJECT_LEN   13
#define VOLT_CONTENT_COMMA_SPACE       ", "
#define VOLT_CONTENT_COMMA_SPACE_LEN   2

static int SetTotalLengths (
   VoltSecureMailObject *obj,
   VoltSecureMailWriteCtx *writeCtx,
   VtRandomObject random
   )
{
  int status;
  unsigned int asciiNumLen, offset, index, count, maxIndex;
#if VT_64_BIT_LENGTH == 64
  VtUInt64 reportLen, currentLen;
#else
  unsigned int reportLen, currentLen;
#endif
  UInt32 numLo, numHi;
  unsigned int newLineLen =
    writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].len;
  unsigned int footerLen =
    writeCtx->itemArray[VOLT_WRITE_SM_ITEM_CONTENT_FOOTER].len;
  VoltLibCtx *libCtx = (VoltLibCtx *)(obj->voltObject.libraryCtx);
  VtIdentityObject getId;
  char *contentTypeLabel = VOLT_CONTENT_TYPE_LABEL;
  char *contentType = VOLT_SECURE_FILE_CONTENT;
  char *contentLengthLabel = VOLT_CONTENT_LENGTH_LABEL;
  char *zdrUtcLine = VOLT_CONTENT_ZDR_UTC;
  char *zdrFromLine = VOLT_CONTENT_ZDR_FROM;
  char *zdrToLine = VOLT_CONTENT_ZDR_TO;
  char *zdrSubjectLine = VOLT_CONTENT_ZDR_SUBJECT;
  char *asciiNum = (char *)0;
  unsigned char *newLine =
    writeCtx->itemArray[VOLT_WRITE_SM_ITEM_NEW_LINE].data;
  VtItem *preP7 = &(writeCtx->itemArray[VOLT_WRITE_SM_PRE_PKCS7]);
  VtItem *report = &(writeCtx->itemArray[VOLT_WRITE_SM_ITEM_CONTENT_REPORT]);
  VtItem *getName;
  VtItem tempItem;
  VtTime theTime;
  unsigned char utcTime[VOLT_UTC_LEN];
  char *commaSpace = VOLT_CONTENT_COMMA_SPACE;
  VoltEncodeDecodeSizeInfo encodeDecodeSizeInfo;
  VOLT_DECLARE_ERROR_TYPE (errorType)
  VOLT_DECLARE_FNCT_LINE (fnctLine)

  do
  {
    /* Build the content descriptor VtItem.
     */
#if VT_64_BIT_LENGTH == 64
    reportLen = (VtUInt64)(obj->contentInfo.len);
#else
    reportLen = obj->contentInfo.len;
#endif
    if ( (obj->formatType == VOLT_MESSAGE_FORMAT_SECURE_MAIL) ||
         (obj->formatType == VOLT_MESSAGE_FORMAT_ZDM_MAIL) )
    {
      /* Build the content-type: and content-length: lines. First, get
       * the length as ASCII characters.
       */
#if VT_64_BIT_LENGTH == 64
      currentLen = obj->dataLen64 + (VtUInt64)footerLen;
      numLo = (UInt32)currentLen;
      numHi = (UInt32)(currentLen >> 32);
#else
      currentLen = obj->dataLen + footerLen;
      VOLT_SET_ERROR_TYPE (errorType, VT_ERROR_TYPE_PRIMARY)
      VOLT_SET_FNCT_LINE (fnctLine)
      status = VT_ERROR_INVALID_INPUT_LENGTH;
      if (currentLen < footerLen)
        break;

      numLo = (UInt32)currentLen;
      numHi = (UInt32)0;
#endif

      VOLT_SET_ERROR_TYPE (errorType, 0)
      VOLT_SET_FNCT_LINE (fnctLine)
      status = ConvertNumToAsciiAlloc (
        libCtx, numLo, numHi, &asciiNum, &asciiNumLen);
      if (status != 0)
        break;

      /* Build the content descriptor buffer, content type label, then
       * the content type, new line, content len label, then length,
       * new line.
       * If this is ZDM there's more to add.
       * Finally, one last new line.
       */
      VOLT_SET_FNCT_LINE (fnctLine)
      status = AppendToVtItem (
        libCtx, contentTypeLabel, VOLT_CONTENT_TYPE_LABEL_LEN,
        (unsigned char *)0, 0, report);
      if (status != 0)
        break;
      VOLT_SET_FNCT_LINE (fnctLine)
      status = AppendToVtItem (
        libCtx, obj->contentInfo.data, obj->contentInfo.len,
        newLine, newLineLen, report);
      if (status != 0)
        break;
      VOLT_SET_FNCT_LINE (fnctLine)
      status = AppendToVtItem (
        libCtx, contentLengthLabel, VOLT_CONTENT_LENGTH_LABEL_LEN,
        (unsigned char *)0, 0, report);
      if (status != 0)
        break;
      VOLT_SET_FNCT_LINE (fnctLine)
      status = AppendToVtItem (
        libCtx, asciiNum, asciiNumLen, newLine, newLineLen, report);
      if (status != 0)
        break;
      if (obj->formatType == VOLT_MESSAGE_FORMAT_ZDM_MAIL)
      {
        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, zdrUtcLine, VOLT_CONTENT_ZDR_UTC_LEN,
          (unsigned char *)0, 0, report);
        if (status != 0)
          break;

        VtGetTime ((VtLibCtx)libCtx, &theTime);
        VoltConvertVtTimeToUTC (&theTime, utcTime);
        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, utcTime, VOLT_UTC_LEN, newLine, newLineLen, report);
        if (status != 0)
          break;

        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, zdrFromLine, VOLT_CONTENT_ZDR_FROM_LEN,
          (unsigned char *)0, 0, report);
        if (status != 0)
          break;

        /* Get the email address of the sender.
         * If we can't get the email address out, don't quit, just
         * print a blank line.
         */
        tempItem.data = (unsigned char *)0;
        tempItem.len = 0;
        VOLT_SET_FNCT_LINE (fnctLine)
        status = VtGetIdentityParam (
          writeCtx->senderIdRef, VtIdentityParamCommonName,
          (Pointer *)&getName);
        if (status == 0)
          tempItem = *getName;

        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, tempItem.data, tempItem.len, newLine, newLineLen, report);
        if (status != 0)
          break;

        /* Print out the list of recipients.
         */
        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, zdrToLine, VOLT_CONTENT_ZDR_TO_LEN,
          (unsigned char *)0, 0, report);
        if (status != 0)
          break;

        VOLT_SET_FNCT_LINE (fnctLine)
        status = VtGetIdentityListCount (
          writeCtx->recipListRef, &count, &maxIndex);
        if (status != 0)
          break;

        for (index = 0; index <= maxIndex; ++index)
        {
          VOLT_SET_FNCT_LINE (fnctLine)
          status = VtGetIdentityListIdentity (
            writeCtx->recipListRef, index, &getId);
          if (status == VT_ERROR_NO_ID_AT_INDEX)
            continue;
          if (status != 0)
            break;

          tempItem.data = (unsigned char *)0;
          tempItem.len = 0;
          VOLT_SET_FNCT_LINE (fnctLine)
          status = VtGetIdentityParam (
            getId, VtIdentityParamCommonName, (Pointer *)&getName);
          if (status == 0)
            tempItem = *getName;

          if (index != maxIndex)
          {
            /* If this is not the last email, we'll need a comma after
             * the address.
             */
            VOLT_SET_FNCT_LINE (fnctLine)
            status = AppendToVtItem (
              libCtx, tempItem.data, tempItem.len,
              commaSpace, VOLT_CONTENT_COMMA_SPACE_LEN, report);
            if (status != 0)
              break;
          }
          else
          {
            /* If this is the last email, start a new line after the
             * address.
             */
            VOLT_SET_FNCT_LINE (fnctLine)
            status = AppendToVtItem (
              libCtx, tempItem.data, tempItem.len, newLine, newLineLen,
              report);
            if (status != 0)
              break;
          }
        }
        if (status != 0)
          break;

        /* Finally, the subject.
         */
        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, zdrSubjectLine, VOLT_CONTENT_ZDR_SUBJECT_LEN,
          (unsigned char *)0, 0, report);
        if (status != 0)
          break;

        VOLT_SET_FNCT_LINE (fnctLine)
        status = AppendToVtItem (
          libCtx, writeCtx->itemArray[VOLT_WRITE_SM_ITEM_SUBJECT].data,
          writeCtx->itemArray[VOLT_WRITE_SM_ITEM_SUBJECT].len,
          newLine, newLineLen, report);
        if (status != 0)
          break;
      }
      VOLT_SET_FNCT_LINE (fnctLine)
      status = AppendToVtItem (
        libCtx, newLine, newLineLen, (unsigned char *)0, 0, report);
      if (status != 0)
        break;

      reportLen = report->len;
    }
    else if (obj->formatType == VOLT_MESSAGE_FORMAT_SECURE_MAIL_2)
    {
      reportLen += (2 * newLineLen);

      VOLT_SET_ERROR_TYPE (errorType, VT_ERROR_TYPE_PRIMARY)
      VOLT_SET_FNCT_LINE (fnctLine)
      status = VT_ERROR_MEMORY;
      report->data = (unsigned char *)Z2Realloc (report->data, reportLen);
      if (report->data == (unsigned char *)0)
        break;

      /* For SecureMail 2, the headers inside the PKCS7 blob consist of some
       * XML data (instead of the MIME-style headers used with V1. So we don't
       * need to prepend the content-type label before writing the header data.
       */
      Z2Memcpy(report->data, obj->contentInfo.data, obj->contentInfo.len);
      offset = obj->contentInfo.len;
      /* A blank line indicates the end of the headers, so add 2 new lines */
      Z2Memcpy (report->data + offset, newLine, newLineLen);
      offset += newLineLen;
      Z2Memcpy (report->data + offset, newLine, newLineLen);
      report->len = (unsigned int)reportLen;
    }
    else
    {
      /* Build the content-type: ...; file-name= line. Add in the label
       * and 2 new lines.
       */
      if (reportLen != 0)
      {
        contentType = (char *)(obj->contentInfo.data);
        asciiNumLen = obj->contentInfo.len;
      }
      else
      {
        reportLen = VOLT_SECURE_FILE_CONTENT_LEN;
        asciiNumLen = VOLT_SECURE_FILE_CONTENT_LEN;
      }

#if VT_64_BIT_LENGTH == 64
      reportLen += (VtUInt64)
        (VOLT_CONTENT_TYPE_LABEL_LEN + VOLT_FILE_NAME_LABEL_LEN +
        writeCtx->fileName.len + 3 + (2 * newLineLen));
#else
      reportLen +=
        VOLT_CONTENT_TYPE_LABEL_LEN + VOLT_FILE_NAME_LABEL_LEN +
        writeCtx->fileName.len + 3 + (2 * newLineLen);
#endif

      VOLT_SET_ERROR_TYPE (errorType, VT_ERROR_TYPE_PRIMARY)
      VOLT_SET_FNCT_LINE (fnctLine)
      status = VT_ERROR_MEMORY;
      asciiNum = (unsigned char *)Z2Malloc ((unsigned int)reportLen, 0);
      if (asciiNum == (unsigned char *)0)
        break;

      /* Build the content descriptor buffer, content type for file
       * label, then the file name, new line, and new line.
       */
      Z2Memcpy (
        asciiNum, VOLT_CONTENT_TYPE_LABEL, VOLT_CONTENT_TYPE_LABEL_LEN);
      offset = VOLT_CONTENT_TYPE_LABEL_LEN;
      Z2Memcpy (asciiNum + offset, contentType, asciiNumLen);
      offset += asciiNumLen;
      Z2Memcpy (asciiNum + offset, "; ", 2);
      offset += 2;
      Z2Memcpy (
        asciiNum + offset, VOLT_FILE_NAME_LABEL, VOLT_FILE_NAME_LABEL_LEN);
      offset += VOLT_FILE_NAME_LABEL_LEN;
      Z2Memcpy (
        asciiNum + offset, writeCtx->fileName.data, writeCtx->fileName.len);
      offset += writeCtx->fileName.len;
      Z2Memcpy (asciiNum + offset, ";", 1);
      offset += 1;
      /* After the file name, newLine, then a blank line.
       */
      Z2Memcpy (asciiNum + offset, newLine, newLineLen);
      offset += newLineLen;
      Z2Memcpy (asciiNum + offset, newLine, newLineLen);

      if (report->data != (unsigned char *)0)
        Z2Free (report->data);
      report->data = (unsigned char *)asciiNum;
      report->len = (unsigned int)reportLen;
      asciiNum = (char *)0;
    }

    /* Set the length of the SignedData. The length is the reportLen
     * plus the dataLen plus the content footerLen.
     */
#if VT_64_BIT_LENGTH == 64
    reportLen += obj->dataLen64;
    reportLen += (VtUInt64)footerLen;
    VOLT_SET_ERROR_TYPE (errorType, 0)
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtSetPkcs7Param (
      obj->p7SignedData, VtPkcs7ParamDataLen64, (Pointer)&reportLen);
    if (status != 0)
      break;
#else
    reportLen += (obj->dataLen + footerLen);
    VOLT_SET_ERROR_TYPE (errorType, 0)
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtSetPkcs7Param (
      obj->p7SignedData, VtPkcs7ParamDataLen, (Pointer)&reportLen);
    if (status != 0)
      break;
#endif

#if VT_64_BIT_LENGTH == 64
    /* Call VtGetTotalOutputLen64 to determine how big the SignedData
     * will be.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtGetTotalOutputLen64 (
      (VtLibCtx)libCtx, VtGetOutputLen64ImplPkcs7,
      (Pointer)(obj->p7SignedData), &(writeCtx->signedDataLen));
    if (status != 0)
      break;
#else
    /* Call Final with no output to determine length.
     */
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtPkcs7WriteFinal (
      obj->p7SignedData, random, (unsigned char *)0, reportLen,
      (unsigned char *)0, 0, &(writeCtx->signedDataLen));
    if (status == 0)
      status = VT_ERROR_GENERAL;
    if (status != VT_ERROR_BUFFER_TOO_SMALL)
      break;
#endif

    /* We now know how many bytes we're going to pass to the enveloper.
     */
#if VT_64_BIT_LENGTH == 64
    VOLT_SET_FNCT_LINE (fnctLine)
    status = VtSetPkcs7Param (

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99国内精品| 欧美国产日韩一二三区| 日韩色视频在线观看| 久久婷婷一区二区三区| 中文字幕 久热精品 视频在线| 中文字幕在线一区免费| 亚洲r级在线视频| 亚洲天堂成人网| 亚洲国产精品传媒在线观看| 亚洲精品成a人| 久久精品国产99| 91在线你懂得| 日韩欧美国产wwwww| 国产精品视频一二| 爽好久久久欧美精品| 国产精品一区二区三区乱码| 欧洲色大大久久| 国产午夜久久久久| 亚洲成人在线观看视频| 国产成人精品影视| 欧美精品第一页| 国产精品久久久久影院老司| 日本美女一区二区三区| 99精品视频在线观看免费| 91精品国产色综合久久不卡电影| 久久九九99视频| 日韩avvvv在线播放| 99在线精品视频| 日韩美女视频在线| 亚洲综合一二三区| 国产成人午夜片在线观看高清观看| 欧美三区在线观看| 国产精品无人区| 久久99精品国产麻豆婷婷洗澡| 91久久一区二区| 国产精品国产三级国产普通话蜜臀| 奇米色777欧美一区二区| 一本久久精品一区二区| 久久色中文字幕| 天堂av在线一区| 色综合久久中文字幕综合网| 国产亚洲精品免费| 免费观看在线综合| 欧美日韩亚洲综合在线| 自拍偷自拍亚洲精品播放| 国产一区二区三区在线观看精品| 宅男噜噜噜66一区二区66| 亚洲免费高清视频在线| 成人不卡免费av| 久久久蜜桃精品| 蜜乳av一区二区| 欧美人xxxx| 亚洲第一二三四区| 色偷偷成人一区二区三区91| 国产精品美女久久久久久久 | av电影一区二区| 26uuu色噜噜精品一区| 日韩高清不卡一区二区三区| 欧美日韩一区三区| 夜色激情一区二区| 在线影视一区二区三区| 亚洲丝袜自拍清纯另类| 91蜜桃视频在线| 1024成人网色www| 美国欧美日韩国产在线播放| 91在线porny国产在线看| 国产精品欧美综合在线| 成人自拍视频在线观看| 国产人成亚洲第一网站在线播放| 韩国理伦片一区二区三区在线播放| 欧美一区二区三区四区视频| 丝袜脚交一区二区| 欧美一二区视频| 伦理电影国产精品| 久久亚洲精精品中文字幕早川悠里| 激情文学综合丁香| 久久夜色精品一区| 国产成人午夜视频| 国产精品美女久久久久aⅴ| 成人开心网精品视频| 国产精品久久久久影视| 成人av中文字幕| 中文幕一区二区三区久久蜜桃| 丁香一区二区三区| 亚洲品质自拍视频| 在线观看亚洲a| 日韩电影免费在线| 日韩三级中文字幕| 国产成人精品一区二区三区网站观看 | www欧美成人18+| 国产不卡在线播放| 亚洲色大成网站www久久九九| 91尤物视频在线观看| 亚洲午夜一区二区| 91精品国产91热久久久做人人| 狠狠久久亚洲欧美| 国产精品视频免费看| 日本高清不卡视频| 免费观看一级特黄欧美大片| 久久精品亚洲精品国产欧美kt∨ | 国产精品毛片a∨一区二区三区| 91无套直看片红桃| 亚洲成av人片观看| 精品久久人人做人人爰| 成人手机电影网| 亚洲妇熟xx妇色黄| 久久久三级国产网站| 91小视频免费观看| 日韩不卡一二三区| 国产日产欧美一区二区三区| 欧美中文字幕亚洲一区二区va在线 | 99国产精品国产精品久久| 亚洲成人综合网站| 精品少妇一区二区三区视频免付费 | 欧美精品 日韩| 国产精品99久久久| 亚洲综合色噜噜狠狠| 欧美成人精品3d动漫h| 99国产精品久久久久久久久久| 图片区日韩欧美亚洲| 国产日韩欧美精品电影三级在线| 色综合久久久久综合体桃花网| 日本欧美在线观看| 91精品国产色综合久久| 国产精品99久久久久| 亚洲国产视频在线| 久久九九全国免费| 欧美日韩日本视频| 高清成人在线观看| 日韩高清不卡在线| 亚洲女子a中天字幕| 精品国产成人在线影院| 色狠狠综合天天综合综合| 黑人巨大精品欧美黑白配亚洲| 亚洲精品国久久99热| 精品久久久久久综合日本欧美 | 亚洲丝袜制服诱惑| 精品卡一卡二卡三卡四在线| 日本高清成人免费播放| 国产美女视频91| 日本三级亚洲精品| 亚洲精品乱码久久久久| 欧美国产丝袜视频| 精品欧美黑人一区二区三区| 在线观看一区日韩| 不卡的电视剧免费网站有什么| 久久狠狠亚洲综合| 亚洲v精品v日韩v欧美v专区| 亚洲人精品午夜| 国产三级欧美三级日产三级99| 91精品在线麻豆| 欧美在线视频日韩| 99久久精品免费| 国产福利一区在线观看| 蜜桃av噜噜一区二区三区小说| 亚洲一二三四久久| 亚洲视频在线一区观看| 中文字幕乱码一区二区免费| 欧美一级二级三级蜜桃| 欧美日韩美少妇| 欧美在线看片a免费观看| 91在线云播放| 不卡在线观看av| 成人综合婷婷国产精品久久 | 亚洲国产精品精华液2区45| 精品对白一区国产伦| 555www色欧美视频| 欧洲精品一区二区三区在线观看| 92精品国产成人观看免费| 菠萝蜜视频在线观看一区| 国产激情视频一区二区三区欧美 | 日韩一区二区影院| 欧美日韩mp4| 9191久久久久久久久久久| 欧美性色aⅴ视频一区日韩精品| 91麻豆.com| 色欧美片视频在线观看 | 亚洲成人动漫av| 亚洲永久免费视频| 曰韩精品一区二区| 亚洲精品久久久蜜桃| 亚洲在线观看免费视频| 亚洲一区二区三区四区的| 亚洲永久免费视频| 亚洲1区2区3区视频| 亚洲国产精品久久不卡毛片| 亚洲国产成人精品视频| 午夜精品久久久久久久99樱桃| 污片在线观看一区二区| 麻豆视频一区二区| 久久66热re国产| 国产九色sp调教91| 天天操天天干天天综合网| 蜜桃av噜噜一区| 亚洲欧洲成人精品av97| 国产精品第一页第二页第三页| 国产精品久久毛片a| 亚洲欧美日韩一区二区 | 中文字幕日韩精品一区| 亚洲视频免费在线|