FetchOCSPResponseA
Firme digitali
Richiede l'edizione Enterprise. Nel codice Delphi, C++Builder e Lazarus la libreria si crea come TPDFlibEnterprise (unit PDFlibEnterprise); la DLL Enterprise e le build ActiveX la forniscono invariata. Le altre edizioni conservano il metodo, che restituisce 0, una stringa vuota o False e imposta LastErrorCode a 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)
Descrizione
Il suffisso A indica l'entry point DLL ANSI (char); l'interfaccia ActiveX/COM espone soltanto la forma Unicode. Il comportamento è identico a FetchOCSPResponse e gli argomenti stringa vengono interpretati usando la code page corrente di SetAnsiMode
Richiede a un responder OCSP lo stato di un certificato e ne restituisce la risposta
Sintassi
Delphi
Function DLFetchOCSPResponseA(InstanceID: Integer; SubjectCertDER: PAnsiChar; SubjectCertDERLength: Integer; IssuerCertDER: PAnsiChar; IssuerCertDERLength: Integer; ResponderURL: PAnsiChar; ByteCount: PInteger): PAnsiChar;
DLL
const char* DLFetchOCSPResponseA(int InstanceID, const char* SubjectCertDER, int SubjectCertDERLength, const char* IssuerCertDER, int IssuerCertDERLength, const char* ResponderURL, int* ByteCount);
ActiveX
Function PDFlib::FetchOCSPResponse(SubjectCertDER As Variant, IssuerCertDER As Variant, ResponderURL As String) As VariantParametri
| SubjectCertDER | Il certificato di cui viene richiesto lo stato, con codifica DER |
|---|---|
| IssuerCertDER | Il certificato che lo ha emesso, con codifica DER |
| ResponderURL | Indirizzo del responder oppure una stringa vuota per usare quello indicato dal certificato del soggetto nell'estensione Authority Information Access. |
Valori restituiti
| Response | I byte OCSPResponse, pronti per l'archivio di sicurezza del documento |
|---|---|
| Stringa vuota | Lo scambio non è riuscito o il responder non ha risposto successful; GetTimeStampError ne indica il motivo. |
Note
Viene restituita solo una risposta riuscita. tryLater o unauthorized sono rapporti di errore, non risposte di stato; conservarli farebbe analizzare al validatore una struttura errata
Il timeout è quello impostato da SetTimeStampOptions
Esempio
Response:= PDF.FetchOCSPResponse(SignerCert, IssuerCert, '');
if Response= '' then
ShowMessage(PDF.GetTimeStampError);