File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
main/java/net/schmizz/sshj/common
test/java/net/schmizz/sshj/transport/kex Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,9 @@ public static synchronized void setRegisterBouncyCastle(boolean registerBouncyCa
276
276
*/
277
277
public static synchronized void setSecurityProvider (String securityProvider ) {
278
278
SecurityUtils .securityProvider = securityProvider ;
279
+ if (null == securityProvider ) {
280
+ SecurityUtils .registerBouncyCastle = null ;
281
+ }
279
282
registrationDone = false ;
280
283
}
281
284
Original file line number Diff line number Diff line change 17
17
18
18
import net .schmizz .sshj .common .SecurityUtils ;
19
19
import net .schmizz .sshj .transport .random .JCERandom ;
20
+ import org .junit .jupiter .api .AfterEach ;
20
21
import org .junit .jupiter .api .BeforeEach ;
21
22
import org .junit .jupiter .api .Test ;
22
23
@@ -43,6 +44,7 @@ public class Curve25519DHTest {
43
44
};
44
45
45
46
@ BeforeEach
47
+ @ AfterEach
46
48
public void clearSecurityProvider () {
47
49
SecurityUtils .setSecurityProvider (null );
48
50
}
You can’t perform that action at this time.
0 commit comments