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
276276 */
277277 public static synchronized void setSecurityProvider (String securityProvider ) {
278278 SecurityUtils .securityProvider = securityProvider ;
279+ if (null == securityProvider ) {
280+ SecurityUtils .registerBouncyCastle = null ;
281+ }
279282 registrationDone = false ;
280283 }
281284
Original file line number Diff line number Diff line change 1717
1818import net .schmizz .sshj .common .SecurityUtils ;
1919import net .schmizz .sshj .transport .random .JCERandom ;
20+ import org .junit .jupiter .api .AfterEach ;
2021import org .junit .jupiter .api .BeforeEach ;
2122import org .junit .jupiter .api .Test ;
2223
@@ -43,6 +44,7 @@ public class Curve25519DHTest {
4344 };
4445
4546 @ BeforeEach
47+ @ AfterEach
4648 public void clearSecurityProvider () {
4749 SecurityUtils .setSecurityProvider (null );
4850 }
You can’t perform that action at this time.
0 commit comments