Discuss this help topic in SecureBlackbox Forum


TElX509Certificate     See also     

Filter: C#/Java  VB.NET  Pascal  C++  PHP  

Detects certificate format.


    static TSBCertFileFormat DetectCertFileFormat(string FileName);
    static TSBCertFileFormat DetectCertFileFormat(System.IO.Stream Stream);
    static TSBCertFileFormat DetectCertFileFormat(byte[] Buffer, int Index, int Size);

    Shared Function DetectCertFileFormat(ByVal FileName As String) As TSBCertFileFormat
    Shared Function DetectCertFileFormat(ByVal Stream As System.IO.Stream) As TSBCertFileFormat
    Shared Function DetectCertFileFormat(ByVal Buffer As Byte(), ByVal Index As Integer, ByVal Size As Integer) As TSBCertFileFormat

    class function DetectCertFileFormat(FileName : string): TSBCertFileFormat;
    class function DetectCertFileFormat(Stream : TStream): TSBCertFileFormat;
    class function DetectCertFileFormat(Buffer : pointer; Size: integer): TSBCertFileFormat;

    static TSBCertFileFormat DetectCertFileFormat(const std::string &FileName);
    static TSBCertFileFormat DetectCertFileFormat(TStream &Stream);
    static TSBCertFileFormat DetectCertFileFormat(TStream *Stream);
    static TSBCertFileFormat DetectCertFileFormat(void * Buffer, int32_t Size);

    integer DetectCertFileFormat(string $FileName)
    integer DetectCertFileFormat(TStream $Stream)
    integer DetectCertFileFormat(TSBPointer|array of byte|string|NULL $Buffer, integer $Size)


  • FileName - name of the file containing certificate
  • Stream - stream containing certificate
  • Buffer - buffer containing certificate
  • Index - starting index of the certificate in Buffer
  • Size - size of the Buffer

Return value

    Returns the file format.

Possible values:


    This method detects format of the certificate (PFX, PEM, DER, SPC).

See also:     DetectKeyFileFormat    

Discuss this help topic in SecureBlackbox Forum