IdTlsClientOptions.pas 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. Rev 1.0 27-03-05 10:04:26 MterWoord
  18. Second import, first time the filenames weren't prefixed with Id
  19. Rev 1.0 27-03-05 09:09:00 MterWoord
  20. Created
  21. }
  22. unit IdTlsClientOptions;
  23. interface
  24. uses
  25. Mono.Security.Protocol.Tls, System.Security.Cryptography.X509Certificates;
  26. type
  27. TIdTlsClientOptions = class
  28. private
  29. FProtocol: SecurityProtocolType;
  30. FCertificateCollection: X509CertificateCollection;
  31. procedure SetProtocol(const Value: SecurityProtocolType);
  32. public
  33. constructor Create;
  34. procedure set_CertificateCollection(const Value: X509CertificateCollection);
  35. published
  36. property Protocol: SecurityProtocolType read FProtocol write SetProtocol;
  37. property CertificateCollection: X509CertificateCollection read FCertificateCollection write set_CertificateCollection;
  38. end;
  39. implementation
  40. { TIdTlsServerOptions }
  41. procedure TIdTlsClientOptions.SetProtocol(const Value: SecurityProtocolType);
  42. begin
  43. FProtocol := Value;
  44. end;
  45. constructor TIdTlsClientOptions.Create;
  46. begin
  47. inherited;
  48. FProtocol := SecurityProtocolType.Tls;
  49. end;
  50. procedure TIdTlsClientOptions.set_CertificateCollection(
  51. const Value: X509CertificateCollection);
  52. begin
  53. FCertificateCollection := Value;
  54. end;
  55. end.