rlebeau on master
Minor tweak to last pull reques… (compare)
rlebeau on master
fix compiling issues for IdStac… Merge pull request #273 from Bi… (compare)
rlebeau on master
Defining HAS_PRawByteString for… (compare)
rlebeau on master
Define PRawByteString for older… Merge pull request #275 from Bi… (compare)
found a bug in IdSSLOpenSSL.pas
procedure DumpCert(AOut: TStrings; AX509: PX509);
->
BIO_get_mem_data( LMem, LBufPtr);
if (LLen > 0) and Assigned(LBufPtr) then begin
BIO_get_mem_data expects pointer to pointer
fixed code;
'
var
LMem: PBIO;
LLen : TIdC_INT;
LBufPtr : Pointer;
lPBPtr : Pointer;
begin
if Assigned(X509_print) then begin
LMem := BIO_new(BIO_s_mem);
try
lPBPtr := @LBufPtr;
X509_print(LMem, AX509);
LLen := BIO_get_mem_data( LMem, lPBPtr);
if (LLen > 0) and Assigned(LBufPtr) then begin
'
DumpCert
code is fine. Look at the declaration of BIO_get_mem_data()
in IdSSLOpenSSLHeaders.pas
: function BIO_get_mem_data(b : PBIO; out pp : Pointer) : TIdC_INT;
In Delphi, out: Pointer
is equivilent to void**
in C. The original code was already passing a pointer-to-pointer. Your change is passing a pointer-to-pointer-to-pointer instead
DumpCert()
at all, its original code is fine. The real problem is in BIO_get_mem_data()
itself in IdSSLOpenSSLHeaders.pas
. When it calls BIO_ctrl()
, it is not passing the correct output pointer - Result := BIO_ctrl(b,BIO_CTRL_INFO,0,pp);
should be Result := BIO_ctrl(b,BIO_CTRL_INFO,0,@pp);
Looks like other functions, like BIO_get_mem_ptr
and BIO_get_ssl
, are also affected by a similar bug
TIdSSPINTLMAuthentication
for NTLM over HTTP, but last time I looked at it, I seem to recall that it is not generalized enough for reuse with SChannel, which also uses SSPI. If we can finish fleshing out the IdSSPI
unit with some missing pieces, and maybe port some of the code from the IdAuthenticationSSPI
unit into IdSSPI
or another common unit, that would go a long way to making an SChannel IOHandler easier to implement within Indy. I'm sure there are pieces of Paul's implementation that duplicate pieces that Indy already has and should reuse. I was already working on learning the SSPI API for SChannel use, but that effort is still in test code and not in Indy yet.
why the IdSASL_NTLM.pas file is not in the tokyo installer?
File only in Indy SVN: 'Protocols\IdSASL_NTLM.pas'
var
LBinding: TIdSocketHandle;
begin
IdIPMCastClient1.IPVersion := TIdIPVersion.Id_IPv6;
IdIPMCastClient1.DefaultPort := 6000;
IdIPMCastClient1.MulticastGroup := 'FF02::1';
IdIPMCastClient1.Bindings.Clear;
LBinding := IdIPMCastClient1.Bindings.Add;
LBinding.IPVersion := IdIPMCastClient1.IPVersion;
LBinding.IP := '::';
LBinding.Port := IdIPMCastClient1.DefaultPort;
IdIPMCastClient1.Active := True;
end;