IdAuthenticationDigest fails to re-register

Giganews Newsgroups
Subject: IdAuthenticationDigest fails to re-register
Posted by:  bwalding (bwaldi…@fm2.optus.net.au)
Date: Wed, 10 Jun 2009

When using the snapshot version of Indy10 (8 June 2009 edition); any attempt to unload and reload (we use DragonSoft's plugin system) BPLs containing the IdAuthenticationDigest unit to fail with an error:

"This authentication method is already registered with class name TIdDigestAuthentication"

This is due to a missing finalization block in IdAuthenticationDigest.pas (the finalization block is present for all the other authentication classes).

I have successfully patched this in my local Indy with the following amendment to IdAuthenticationDigest.pas:

initialization
  RegisterAuthenticationMethod('Digest', TIdDigestAuthentication);
finalization
  UnregisterAuthenticationMethod('Digest');
end.

Replies