diff --git a/blcksock.pas b/blcksock.pas index f4037a6..2960672 100644 --- a/blcksock.pas +++ b/blcksock.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Ararat Synapse | 008.003.004 | +| Project : Ararat Synapse | 008.003.005 | |==============================================================================| | Content: Library base | |==============================================================================| @@ -107,7 +107,7 @@ uses const - SynapseRelease = '33'; + SynapseRelease = '34'; cLocalhost = '127.0.0.1'; cAnyHost = '0.0.0.0'; @@ -4169,7 +4169,7 @@ end; function TTCPBlockSocket.SSLCheck: Boolean; var - ErrBuf: array[0..255] of Char; + ErrBuf: String; begin Result := true; FSSLLastErrorDesc := ''; @@ -4178,8 +4178,8 @@ begin if FSSLLastError <> 0 then begin Result := False; - ErrErrorString(FSSLLastError, ErrBuf); - FSSLLastErrorDesc := ErrBuf; + ErrBuf := StringOfChar(#0, 256); + FSSLLastErrorDesc := ErrErrorString(FSSLLastError, ErrBuf); end; end; diff --git a/dnssend.pas b/dnssend.pas index b8d99c6..b4175a8 100644 --- a/dnssend.pas +++ b/dnssend.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Ararat Synapse | 002.005.001 | +| Project : Ararat Synapse | 002.006.000 | |==============================================================================| | Content: DNS client | |==============================================================================| @@ -123,6 +123,7 @@ type FNameserverInfo: TStringList; FAdditionalInfo: TStringList; FAuthoritative: Boolean; + FTruncated: Boolean; function ReverseIP(Value: AnsiString): AnsiString; function ReverseIP6(Value: AnsiString): AnsiString; function CompressName(const Value: AnsiString): AnsiString; @@ -178,6 +179,9 @@ type {:@True, if ansfer is authoritative.} property Authoritative: Boolean read FAuthoritative; + {:@True, if ansfer is truncated to 512 bytes.} + property Truncated: Boolean read FTRuncated; + {:Detailed informations from name server reply. One record per line. Record have comma delimited entries with type number, TTL and data filelds. This information contains detailed information about query reply.} @@ -450,7 +454,11 @@ begin R := R + ',' + DecodeLabels(j); end; QTYPE_TXT: - R := DecodeString(j); + begin + R := ''; + while j < i do + R := R + DecodeString(j); + end; QTYPE_GPOS: begin R := DecodeLabels(j); @@ -515,6 +523,7 @@ begin flag := DecodeInt(Buf, 3); FRCode := Flag and $000F; FAuthoritative := (Flag and $0400) > 0; + FTruncated := (Flag and $0200) > 0; if FRCode = 0 then begin qdcount := DecodeInt(Buf, 5); diff --git a/ftpsend.pas b/ftpsend.pas index 85cb4de..6cf1837 100644 --- a/ftpsend.pas +++ b/ftpsend.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Ararat Synapse | 003.000.004 | +| Project : Ararat Synapse | 003.001.000 | |==============================================================================| | Content: FTP client | |==============================================================================| @@ -94,6 +94,7 @@ type FFileTime: TDateTime; FOriginalLine: string; FMask: string; + FPermission: string; public {: You can assign another TFTPListRec to this object.} procedure Assign(Value: TFTPListRec); virtual; @@ -113,6 +114,8 @@ type property OriginalLine: string read FOriginalLine write FOriginalLine; {:mask what was used for parsing} property Mask: string read FMask write FMask; + {:permission string (depending on used mask!)} + property Permission: string read FPermission write FPermission; end; {:@abstract(This is TList of TFTPListRec objects.) @@ -1753,6 +1756,7 @@ begin + EncodeTime(mHours, mminutes, mseconds, 0); if Permissions <> '' then begin + Value.Permission := Permissions; Value.Readable := Uppercase(permissions)[2] = 'R'; if Uppercase(permissions)[1] = 'D' then begin diff --git a/httpsend.pas b/httpsend.pas index ce269c0..00ba70f 100644 --- a/httpsend.pas +++ b/httpsend.pas @@ -160,11 +160,11 @@ type {:Mime type of sending data. Default is: 'text/html'.} property MimeType: string read FMimeType Write FMimeType; - {:Define protocol version. Possible values are: '1.1' (default), - '1.0' and '0.9'.} + {:Define protocol version. Possible values are: '1.1', '1.0' (default) + and '0.9'.} property Protocol: string read FProtocol Write FProtocol; - {:If @true (default value), keppalives in HTTP protocol 1.1 is enabled.} + {:If @true (default value), keepalives in HTTP protocol 1.1 is enabled.} property KeepAlive: Boolean read FKeepAlive Write FKeepAlive; {:if @true, then server is requested for 100status capability when uploading diff --git a/synacode.pas b/synacode.pas index c2b85eb..64f9f98 100644 --- a/synacode.pas +++ b/synacode.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Ararat Synapse | 002.001.001 | +| Project : Ararat Synapse | 002.001.002 | |==============================================================================| | Content: Coding and decoding support | |==============================================================================| @@ -810,8 +810,8 @@ end; function UpdateCrc32(Value: Byte; Crc32: Integer): Integer; begin - Result := ((Crc32 shr 8) and Integer($00FFFFFF)) xor - crc32tab[Byte(Crc32 xor Integer(Value)) and Integer($000000FF)]; + Result := (Crc32 shr 8) + xor crc32tab[Byte(Value xor (Crc32 and Integer($000000FF)))]; end; {==============================================================================} @@ -823,6 +823,7 @@ begin Result := Integer($FFFFFFFF); for n := 1 to Length(Value) do Result := UpdateCrc32(Ord(Value[n]), Result); + Result := not Result; end; {==============================================================================} @@ -1047,7 +1048,7 @@ begin BufAnsiChar[P] := $80; Inc(P); Cnt := 64 - 1 - Cnt; - if Cnt > 0 then + if Cnt >= 0 then if Cnt < 8 then begin for n := 0 to cnt - 1 do diff --git a/synassl.pas b/synassl.pas index 87e9f26..fa7d5b6 100644 --- a/synassl.pas +++ b/synassl.pas @@ -1,5 +1,5 @@ {==============================================================================| -| Project : Ararat Synapse | 003.000.000 | +| Project : Ararat Synapse | 003.000.002 | |==============================================================================| | Content: SSL support by OpenSSL | |==============================================================================| @@ -399,7 +399,7 @@ var [DllImport(DLLUtilName, CharSet = CharSet.Ansi, SetLastError = False, CallingConvention= CallingConvention.cdecl, EntryPoint = 'ERR_error_string')] - function ErrErrorString(e: integer; buf: String): String; external; + function ErrErrorString(e: integer; var buf: String): String; external; [DllImport(DLLUtilName, CharSet = CharSet.Ansi, SetLastError = False, CallingConvention= CallingConvention.cdecl, @@ -538,7 +538,7 @@ var function SslX509Digest(data: PX509; _type: PEVP_MD; md: String; var len: Integer):Integer; function SslEvpMd5:PEVP_MD; // function ErrErrorString(e: integer; buf: PChar): PChar; - function ErrErrorString(e: integer; buf: String): String; + function ErrErrorString(e: integer; var buf: String): String; function ErrGetError: integer; procedure ErrClearError; procedure ErrFreeStrings; @@ -832,7 +832,7 @@ end; function SslCtxLoadVerifyLocations(ctx: PSSL_CTX; const CAfile: String; const CApath: String):Integer; begin if InitSSLInterface and Assigned(_SslCtxLoadVerifyLocations) then - Result := _SslCtxLoadVerifyLocations(ctx, PChar(CAfile), PChar(CApath)) + Result := _SslCtxLoadVerifyLocations(ctx, Pointer(CAfile), Pointer(CApath)) else Result := 0; end; @@ -1029,10 +1029,10 @@ begin end; //function ErrErrorString(e: integer; buf: PChar): PChar; -function ErrErrorString(e: integer; buf: String): String; +function ErrErrorString(e: integer; var buf: String): String; begin if InitSSLInterface and Assigned(_ErrErrorString) then - Result := _ErrErrorString(e, PChar(buf)) + Result := PChar(_ErrErrorString(e, PChar(buf))) else Result := ''; end;