HPDFParsePSD2QcStatement Function

Parses the DER of one ETSI TS 119 495 PSD2QcType into a THPDFPSD2QcStatement and rejects any malformed input as a whole

Declaration

function HPDFParsePSD2QcStatement(const StatementInfoDER: TBytes;
  out Statement: THPDFPSD2QcStatement): boolean;

Unit

HPDFSignVerify

Parameters

ParameterPurpose
StatementInfoDERThe statementInfo of the QCStatement 0.4.0.19495.2: exactly one DER-encoded SEQUENCE { rolesOfPSP, nCAName, nCAId }
StatementReceives the roles and the NCA name and identifier; empty whenever the function returns false

Return value

true when the buffer holds a well-formed PSD2QcType; false for an empty buffer and for any of the deviations below

Rejected input

Example

var
  Statement: THPDFPSD2QcStatement;
  I: Integer;
begin
  if HPDFParsePSD2QcStatement(StatementInfoDER, Statement) then
  begin
    for I:= 0 to High(Statement.RolesOfPSP) do
      Writeln(Statement.RolesOfPSP[I].Name, ' (', Statement.RolesOfPSP[I].OID, ')');
    Writeln('NCA: ', Statement.NCAName, ' / ', Statement.NCAId);
  end;
end;

Usage notes

Related APIs