Release 34

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@74 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby
2008-04-24 07:31:06 +00:00
parent 9fc9a696f4
commit d9f38e7342
6 changed files with 35 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 008.003.004 | | Project : Ararat Synapse | 008.003.005 |
|==============================================================================| |==============================================================================|
| Content: Library base | | Content: Library base |
|==============================================================================| |==============================================================================|
@@ -107,7 +107,7 @@ uses
const const
SynapseRelease = '33'; SynapseRelease = '34';
cLocalhost = '127.0.0.1'; cLocalhost = '127.0.0.1';
cAnyHost = '0.0.0.0'; cAnyHost = '0.0.0.0';
@@ -4169,7 +4169,7 @@ end;
function TTCPBlockSocket.SSLCheck: Boolean; function TTCPBlockSocket.SSLCheck: Boolean;
var var
ErrBuf: array[0..255] of Char; ErrBuf: String;
begin begin
Result := true; Result := true;
FSSLLastErrorDesc := ''; FSSLLastErrorDesc := '';
@@ -4178,8 +4178,8 @@ begin
if FSSLLastError <> 0 then if FSSLLastError <> 0 then
begin begin
Result := False; Result := False;
ErrErrorString(FSSLLastError, ErrBuf); ErrBuf := StringOfChar(#0, 256);
FSSLLastErrorDesc := ErrBuf; FSSLLastErrorDesc := ErrErrorString(FSSLLastError, ErrBuf);
end; end;
end; end;

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 002.005.001 | | Project : Ararat Synapse | 002.006.000 |
|==============================================================================| |==============================================================================|
| Content: DNS client | | Content: DNS client |
|==============================================================================| |==============================================================================|
@@ -123,6 +123,7 @@ type
FNameserverInfo: TStringList; FNameserverInfo: TStringList;
FAdditionalInfo: TStringList; FAdditionalInfo: TStringList;
FAuthoritative: Boolean; FAuthoritative: Boolean;
FTruncated: Boolean;
function ReverseIP(Value: AnsiString): AnsiString; function ReverseIP(Value: AnsiString): AnsiString;
function ReverseIP6(Value: AnsiString): AnsiString; function ReverseIP6(Value: AnsiString): AnsiString;
function CompressName(const Value: AnsiString): AnsiString; function CompressName(const Value: AnsiString): AnsiString;
@@ -178,6 +179,9 @@ type
{:@True, if ansfer is authoritative.} {:@True, if ansfer is authoritative.}
property Authoritative: Boolean read FAuthoritative; 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 {:Detailed informations from name server reply. One record per line. Record
have comma delimited entries with type number, TTL and data filelds. have comma delimited entries with type number, TTL and data filelds.
This information contains detailed information about query reply.} This information contains detailed information about query reply.}
@@ -450,7 +454,11 @@ begin
R := R + ',' + DecodeLabels(j); R := R + ',' + DecodeLabels(j);
end; end;
QTYPE_TXT: QTYPE_TXT:
R := DecodeString(j); begin
R := '';
while j < i do
R := R + DecodeString(j);
end;
QTYPE_GPOS: QTYPE_GPOS:
begin begin
R := DecodeLabels(j); R := DecodeLabels(j);
@@ -515,6 +523,7 @@ begin
flag := DecodeInt(Buf, 3); flag := DecodeInt(Buf, 3);
FRCode := Flag and $000F; FRCode := Flag and $000F;
FAuthoritative := (Flag and $0400) > 0; FAuthoritative := (Flag and $0400) > 0;
FTruncated := (Flag and $0200) > 0;
if FRCode = 0 then if FRCode = 0 then
begin begin
qdcount := DecodeInt(Buf, 5); qdcount := DecodeInt(Buf, 5);

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 003.000.004 | | Project : Ararat Synapse | 003.001.000 |
|==============================================================================| |==============================================================================|
| Content: FTP client | | Content: FTP client |
|==============================================================================| |==============================================================================|
@@ -94,6 +94,7 @@ type
FFileTime: TDateTime; FFileTime: TDateTime;
FOriginalLine: string; FOriginalLine: string;
FMask: string; FMask: string;
FPermission: string;
public public
{: You can assign another TFTPListRec to this object.} {: You can assign another TFTPListRec to this object.}
procedure Assign(Value: TFTPListRec); virtual; procedure Assign(Value: TFTPListRec); virtual;
@@ -113,6 +114,8 @@ type
property OriginalLine: string read FOriginalLine write FOriginalLine; property OriginalLine: string read FOriginalLine write FOriginalLine;
{:mask what was used for parsing} {:mask what was used for parsing}
property Mask: string read FMask write FMask; property Mask: string read FMask write FMask;
{:permission string (depending on used mask!)}
property Permission: string read FPermission write FPermission;
end; end;
{:@abstract(This is TList of TFTPListRec objects.) {:@abstract(This is TList of TFTPListRec objects.)
@@ -1753,6 +1756,7 @@ begin
+ EncodeTime(mHours, mminutes, mseconds, 0); + EncodeTime(mHours, mminutes, mseconds, 0);
if Permissions <> '' then if Permissions <> '' then
begin begin
Value.Permission := Permissions;
Value.Readable := Uppercase(permissions)[2] = 'R'; Value.Readable := Uppercase(permissions)[2] = 'R';
if Uppercase(permissions)[1] = 'D' then if Uppercase(permissions)[1] = 'D' then
begin begin

View File

@@ -160,11 +160,11 @@ type
{:Mime type of sending data. Default is: 'text/html'.} {:Mime type of sending data. Default is: 'text/html'.}
property MimeType: string read FMimeType Write FMimeType; property MimeType: string read FMimeType Write FMimeType;
{:Define protocol version. Possible values are: '1.1' (default), {:Define protocol version. Possible values are: '1.1', '1.0' (default)
'1.0' and '0.9'.} and '0.9'.}
property Protocol: string read FProtocol Write FProtocol; 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; property KeepAlive: Boolean read FKeepAlive Write FKeepAlive;
{:if @true, then server is requested for 100status capability when uploading {:if @true, then server is requested for 100status capability when uploading

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 002.001.001 | | Project : Ararat Synapse | 002.001.002 |
|==============================================================================| |==============================================================================|
| Content: Coding and decoding support | | Content: Coding and decoding support |
|==============================================================================| |==============================================================================|
@@ -810,8 +810,8 @@ end;
function UpdateCrc32(Value: Byte; Crc32: Integer): Integer; function UpdateCrc32(Value: Byte; Crc32: Integer): Integer;
begin begin
Result := ((Crc32 shr 8) and Integer($00FFFFFF)) xor Result := (Crc32 shr 8)
crc32tab[Byte(Crc32 xor Integer(Value)) and Integer($000000FF)]; xor crc32tab[Byte(Value xor (Crc32 and Integer($000000FF)))];
end; end;
{==============================================================================} {==============================================================================}
@@ -823,6 +823,7 @@ begin
Result := Integer($FFFFFFFF); Result := Integer($FFFFFFFF);
for n := 1 to Length(Value) do for n := 1 to Length(Value) do
Result := UpdateCrc32(Ord(Value[n]), Result); Result := UpdateCrc32(Ord(Value[n]), Result);
Result := not Result;
end; end;
{==============================================================================} {==============================================================================}
@@ -1047,7 +1048,7 @@ begin
BufAnsiChar[P] := $80; BufAnsiChar[P] := $80;
Inc(P); Inc(P);
Cnt := 64 - 1 - Cnt; Cnt := 64 - 1 - Cnt;
if Cnt > 0 then if Cnt >= 0 then
if Cnt < 8 then if Cnt < 8 then
begin begin
for n := 0 to cnt - 1 do for n := 0 to cnt - 1 do

View File

@@ -1,5 +1,5 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 003.000.000 | | Project : Ararat Synapse | 003.000.002 |
|==============================================================================| |==============================================================================|
| Content: SSL support by OpenSSL | | Content: SSL support by OpenSSL |
|==============================================================================| |==============================================================================|
@@ -399,7 +399,7 @@ var
[DllImport(DLLUtilName, CharSet = CharSet.Ansi, [DllImport(DLLUtilName, CharSet = CharSet.Ansi,
SetLastError = False, CallingConvention= CallingConvention.cdecl, SetLastError = False, CallingConvention= CallingConvention.cdecl,
EntryPoint = 'ERR_error_string')] 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, [DllImport(DLLUtilName, CharSet = CharSet.Ansi,
SetLastError = False, CallingConvention= CallingConvention.cdecl, SetLastError = False, CallingConvention= CallingConvention.cdecl,
@@ -538,7 +538,7 @@ var
function SslX509Digest(data: PX509; _type: PEVP_MD; md: String; var len: Integer):Integer; function SslX509Digest(data: PX509; _type: PEVP_MD; md: String; var len: Integer):Integer;
function SslEvpMd5:PEVP_MD; function SslEvpMd5:PEVP_MD;
// function ErrErrorString(e: integer; buf: PChar): PChar; // 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; function ErrGetError: integer;
procedure ErrClearError; procedure ErrClearError;
procedure ErrFreeStrings; procedure ErrFreeStrings;
@@ -832,7 +832,7 @@ end;
function SslCtxLoadVerifyLocations(ctx: PSSL_CTX; const CAfile: String; const CApath: String):Integer; function SslCtxLoadVerifyLocations(ctx: PSSL_CTX; const CAfile: String; const CApath: String):Integer;
begin begin
if InitSSLInterface and Assigned(_SslCtxLoadVerifyLocations) then if InitSSLInterface and Assigned(_SslCtxLoadVerifyLocations) then
Result := _SslCtxLoadVerifyLocations(ctx, PChar(CAfile), PChar(CApath)) Result := _SslCtxLoadVerifyLocations(ctx, Pointer(CAfile), Pointer(CApath))
else else
Result := 0; Result := 0;
end; end;
@@ -1029,10 +1029,10 @@ begin
end; end;
//function ErrErrorString(e: integer; buf: PChar): PChar; //function ErrErrorString(e: integer; buf: PChar): PChar;
function ErrErrorString(e: integer; buf: String): String; function ErrErrorString(e: integer; var buf: String): String;
begin begin
if InitSSLInterface and Assigned(_ErrErrorString) then if InitSSLInterface and Assigned(_ErrErrorString) then
Result := _ErrErrorString(e, PChar(buf)) Result := PChar(_ErrErrorString(e, PChar(buf)))
else else
Result := ''; Result := '';
end; end;