Skip to main content

Postman での 1 つの SAD による複数のハッシュへの署名

このガイドでは、クライアントクレデンシャルフローの認証方式を使用しています。1 つの SAD(署名アクティベーションデータ)で複数のハッシュに署名するために実行する必要がある API 呼び出しと、その実行回数を説明します。

注記

この方法では、[6 - DTM: extendTransaction]と[7 - DTM: CSC Signatures SignHash]を実行する前に、[3 - Content Signing Service: Register Document]と[4 – Content Signing Service Create Hash] API 呼び出しで必要なハッシュの数を事前に計算する必要があります。

[7 - DTM: CSC Signatures SignHash]の応答は、同手順の API 呼び出し要求で送信されたハッシュの順番に対応しています。 

[8 - Content Signing Service: Embed Signature] API 呼び出しは、文書に署名を埋め込むために、1 サイクルにつき最大 200 回繰り返し実行できます。

ハッシュに署名するには、以下の各 API 呼び出しを実行します。

注記

アクセストークンの有効期限は 1 時間ですが、DigiCert​​®​​ によって 24 時間まで延長できます。

  1. Postman のウィンドウで、[Collections](左側メニュー) > Content Signing Service > [DTM CSC Credential List]を選択します。

  2. 右側のウィンドウで、[Authorization]タブに切り替えます。

  3. [Get New Access Token]を選択します。

  4. 新しいポップアップウィンドウで、[Proceed]を選択します。

  5. アクセストークンを適用するには、[Use Token]を選択します。

自分の DigiCert ONE アカウントに保存されているクレデンシャル(証明書)のリストを取得するには、以下の手順を実行します。

  1. コレクション Content Signing Service-SealSign CADES - API-Token Flow - Visible Signature works を開きます。

  2. [1 - DTM CSC Credential List] > [Send]を選択します。

使用した DigiCert ONE CredentialID (証明書)は本文に表示されます。

DigiCert ONE で使用されている機能の概要を取得するには、以下の手順を実行します。

  • [2 - DTM CSC Credential Info] > [Send]を選択します。

DigiCert ONE で使用されている機能を確認できます。

PDF document

To register a PDF document:

  1. Select 3 - Content Signing Service: Register Document.

  2. Configure "tsa_url" variable value by entering the URL of the timestamp authority you use to sign documents.

  3. Select Send.

To change signature appearance, use the following configurations:

Configuration

Description

type (optional)

Depending on the type, you’re able to create a certified MDP (document modification detection and prevention) document. Default isn’t certified and shows a green tick. Certified shows a ribbon with a seal.

Examples:

NOT_CERTIFIED

CERTIFIED_NO_CHANGES_ALLOWED

CERTIFIED_FORM_FILLING

CERTIFIED_FORM_FILLING_AND_ANNOTATIONS

preservation_size (optional)

Enter preservation size of the space for embedding the signature in bytes. Value should be a multiple of 1024. (Format: int32).

signature_rectangle (optional)

Set the position and size of the digital signature annotation. The default is an invisible signature. The position is defined by four values for the lower-left corner (x, y) and dimensions (w, h) of the rectangle. The units are document points (1 point = 1/72 inch, A4 = 595 x 842 points, letter = 612 x 792 points, 1cm = 28.3465 points) measured from the lower left corner of the page. If either the width or height is zero or negative, an invisible signature is created, that is, no visible appearance is created for the signature.

(Format: int32).

page: Enter page on which the signature is added.

x: Enter x value of lower-left corner.

y: Enter y value of lower-left corner.

w: Enter width dimension of rectangle.

h: Enter height dimension of rectangle.

signature_text1 (optional)

Enter specific signature text instead of standard. (Example: signer's name).

reason (optional)

Enter reason.

contact (optional)

Enter contact.

font_text1 (optional)

Enter name of the font.

font_size_text1 (optional)

Enter font size of signature text 1. If attribute isn’t present default of 16pt is used. (Format: int32).

signature_text2 (optional)

Enter specific signature text instead of standard. (Example: signer’s name, reason and/or signing time).

font_text2 (optional)

Enter name of the font.

font_size_text2 (optional)

Enter font size of signature text 2. If attribute isn’t present default of 8pt is used. (Format: int32).

signature_fill_color (optional)

Enter background color in RGB. The default is 16761024 (red = 192, green = 192, blue = 255).

Color value is calculated as follows:

color red + green * 256 + blue * 256 * 256. To keep the rectangle transparent, set the value to -1. (Format: int32).

signature_stroke_color (optional)

Enter the color of the signature’s border line as RGB value. The default is 8405056 (red = 64, green = 64, blue = 128).

Color value is calculated as follows:

color red + green * 256 + blue * 256 * 256. To keep it transparent, set the value to -1. (Format: int32).

signature_line_width (optional)

Enter the thickness of the line surrounding the visual signature in points. (Format: int32).

background_image (optional)

Insert the image to be embedded in the signature field. (Base64 encoded). (Example: "dGVzdA==”).

XML document

To register an XML document:

  1. Select 3 - Content Signing Service: Register Document.

  2. Configure "tsa_url" variable value by entering the URL of the timestamp authority you use to sign documents.

  3. Select Send.

Use the following configurations:

Configuration

Description

canonicalization_method

Enter the canonicalization method for XML signing.

Examples:

INCLUSIVE or EXCLUSIVE

signature_type

Enter signature type of the XML document to be signed.

Examples:

XAdES.enveloped/  or XAdES.enveloping

ハッシュを作成するには、以下の手順を実行します。

  1. 書類を添付します。

  2. [4 - Content Signing Service: Create Hash] > [Send]を選択します。

  3. ステップ 3 の「文書の登録」ステップ 4 の「ハッシュの作成」を、計算したいハッシュ数に達するまで連続して繰り返します。

DocumentID と、それに対応するハッシュが返されます。

ヒント

ステップ 3 の「文書の登録」を実行するたびに異なる文書をアップロードすると、異なる文書のハッシュを計算してテストできます。

SAD(署名アクティベーションデータ)を生成し、Go>Sign Mobile アプリケーションで承認を開始します。

  1. [5 - DTM: CSC Credential Authorize] > [Send]を選択します。

  2. Go>Sign Mobile アプリケーションで、[Authorization request] > [Authorize]を選択します。

ハッシュに署名するために必要な有効な SAD が返されます。これは「署名の埋め込み」ステップで必要になります。

注記

DigiCert ONE デモ環境では、Go>Sign Mobile アプリケーション経由の再認証のデフォルト値は「250,000 ハッシュまたは 30 日」に設定されています。

DigiCert ONE 本番環境では、Go>Sign Mobile アプリケーション経由の再認証のデフォルト値は「100 万ハッシュまたは 95 日」に設定されています。

ハッシュに署名するには、以下の手順を実行します。

  • [7 - DTM: CSC Signatures SignHash] > [Send]を選択します。

送信されたハッシュ 1 つにつき 1 つの署名が返されます。

新しいハッシュに署名するには、以下の手順を実行します。

  1. [8 - Content Signing Service: Embed Signature]を選択します。

  2. 「クレデンシャルの承認」ステップで作成された SAD が自動的に更新されます。

  3. [Send]を選択します。

  4. [4 - Content Signing Service: Create Hash]で受け取った順番で、各署名に対してこの手順を個別に繰り返します。

文書をダウンロードし、署名の有効性を確認するには、以下の手順を実行します。

  • [Save as example](右下) > [Save response to file]を選択します。