Skip to main content

Firma di più hash in Postman con un SAD

Questa guida utilizza il metodo di autenticazione con flusso di credenziali client. Spiega quali richiami API devono essere eseguiti e il numero di volte in cui è necessaria l’esecuzione per firmare più hash con un SAD (dati di attivazione firma).

Nota

In questo metodo, devi precalcolare il numero di hash che desideri con i richiami API "3 - PDF Service: Registra documento" e "4 – PDF Service Crea hash" prima di eseguire "6 - DTM: extendTransaction" e "7 - DTM: CSC Signatures SignHash".

La firma nella risposta "7 - DTM: CSC Signatures SignHash" corrisponde all’ordine degli hash inviati nella sua richiesta di richiamo API.

Puoi eseguire il richiamo API "8 - PDF Service: Embed Signature" ripetutamente fino a 200 volte per ciclo per nidificare le firme nei documenti.

Per firmare un hash, esegui i singoli richiami API di seguito:

Nota

Il token di accesso è valido per un’ora ma può essere esteso da DigiCert​​®​​ fino a 24 ore.

  1. Nella finestra Postman, seleziona Collections (Raccolte) (menu a sinistra) > PDF Service 2.0 (PDF Service 2.0) > DTM CSC Credential List (Elenco credenziali DTM CSC).

  2. Nella finestra destra, passa alla scheda Authorization (Autorizzazione).

  3. Seleziona Get New Access Token (Ottieni nuovo token d’accesso).

  4. Nella nuova finestra a comparsa, seleziona Proceed (Procedi).

  5. Per applicare il token di accesso, seleziona Use Token (Usa token).

Per ottenere un elenco di credenziali (certificati) memorizzati nel tuo account DigiCert ONE:

  1. Apri la raccolta PDFService-2-0-SealSign CADES - Flusso token API - Lavori di firma visibili.

  2. Seleziona 1 - Elenco credenziali DTM CSC > Invia.

I tuoi DigiCert ONE CredentialIDs (certificati) utilizzati sono visualizzati nel corpo.

Per ottenere una panoramica delle funzioni usate in DigiCert ONE:

  • Seleziona 2 - Info credenziali DTM CSC > Invia.

Puoi vedere le funzioni usate in 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

Per creare un hash:

  1. Allegare il documento.

  2. Seleziona 4 - PDF Service Crea hash: > Invia.

  3. Ripeti la Fase 3. Registra documento e la Fase 4. Crea hash consecutivamente fino a raggiungere il numero di hash che desideri calcolare.

Riceverai DocumentID e i loro hash corrispondenti.

Suggerimento

Carica diversi documenti PDF dopo ciascuna esecuzioni della "Fase 3. Registra documento" per calcolare gli hash e testare con diversi documenti.

Per generare un SAD (dati di attivazione firma) e avviare l’autorizzazione tramite l’applicazione Go>Sign Mobile:

  1. Seleziona 5 - DTM Autorizza con credenziale CSC: > Invia.

  2. Naviga fino all’applicazione Go>Sign Mobile > Richiesta autorizzazione > Autorizza.

Riceverà un SAD valido necessario per firmare l’hash. È necessario nella “fase Nidifica firma”.

Nota

Nell’ambiente demo DigiCert ONE, i valori predefiniti per la riautorizzazione tramite applicazione Go>Sign Mobile sono impostati su "250.000 hash o 30 giorni".

Nell’ambiente di produzione DigiCert ONE, i valori predefiniti per la riautorizzazione tramite applicazione Go>Sign Mobile sono impostati su "1 milione di hash o 95 giorni".

Per firmare l’hash:

  • Seleziona 7 - DTM CSC Signatures SignHash: > Invia.

Ricevi una firma per hash inviato.

Per firmare un nuovo hash:

  1. Seleziona 8 - PDF Service Nidifica firma:.

  2. Il SAD creato nella fase Autorizza credenziali saranno aggiornati automaticamente.

  3. Seleziona Invia.

  4. Ripetere questa procedura per ciascuna firma singolarmente nell’ordine in cui le hai ricevute in "4 - PDF Service: Crea hash”.

Per scaricare il PDF e controllare la validità della firma:

  • Seleziona Salva come esempio (in basso a destra) > Salva risposta su file.