File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ protected void SetAddress(string url)
104
104
/// </summary>
105
105
protected void CreateConnection ( ConnectionOptions options )
106
106
{
107
+ if ( options . ConnSSL )
108
+ {
109
+ Connection . DisableServerCertValidation = true ;
110
+ this . address = new Address ( options . Url . Replace ( "amqp://" , "amqps://" ) ) ;
111
+ }
107
112
Open open = new Open ( )
108
113
{
109
114
ContainerId = Guid . NewGuid ( ) . ToString ( )
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public abstract class ConnectionOptions : Options
65
65
public int Heartbeat { get ; protected set ; }
66
66
public string AuthMech { get ; protected set ; }
67
67
public int FrameSize { get ; private set ; }
68
+ public bool ConnSSL { get ; protected set ; }
68
69
69
70
/// <summary>
70
71
/// Constructor
@@ -86,6 +87,8 @@ public ConnectionOptions() : base()
86
87
( string authMech ) => { this . AuthMech = authMech ; } ) ;
87
88
this . Add ( "conn-max-frame-size=" , "Set connection max frame size" ,
88
89
( int frameSize ) => { this . FrameSize = frameSize ; } ) ;
90
+ this . Add ( "conn-ssl=" , "Enable ssl connection without verify host adn enable trustAll" ,
91
+ ( bool connSSL ) => { this . ConnSSL = connSSL ; } ) ;
89
92
}
90
93
}
91
94
Original file line number Diff line number Diff line change @@ -102,6 +102,11 @@ protected void SetAddress(string url)
102
102
/// </summary>
103
103
protected void CreateConnection ( ConnectionOptions options )
104
104
{
105
+ if ( options . ConnSSL )
106
+ {
107
+ Connection . DisableServerCertValidation = true ;
108
+ this . address = new Address ( options . Url . Replace ( "amqp://" , "amqps://" ) ) ;
109
+ }
105
110
Open open = new Open ( )
106
111
{
107
112
ContainerId = Guid . NewGuid ( ) . ToString ( )
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ public abstract class ConnectionOptions : Options
65
65
public int Heartbeat { get ; protected set ; }
66
66
public string AuthMech { get ; protected set ; }
67
67
public int FrameSize { get ; private set ; }
68
+ public bool ConnSSL { get ; protected set ; }
68
69
69
70
/// <summary>
70
71
/// Constructor
@@ -86,6 +87,8 @@ public ConnectionOptions() : base()
86
87
( string authMech ) => { this . AuthMech = authMech ; } ) ;
87
88
this . Add ( "conn-max-frame-size=" , "Set connection max frame size" ,
88
89
( int frameSize ) => { this . FrameSize = frameSize ; } ) ;
90
+ this . Add ( "conn-ssl=" , "Enable ssl connection without verify host adn enable trustAll" ,
91
+ ( bool connSSL ) => { this . ConnSSL = connSSL ; } ) ;
89
92
}
90
93
}
91
94
You can’t perform that action at this time.
0 commit comments