File tree Expand file tree Collapse file tree 2 files changed +0
-40
lines changed
main/java/org/jruby/ext/openssl
test/java/org/jruby/ext/openssl Expand file tree Collapse file tree 2 files changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -110,28 +110,6 @@ public abstract class SecurityHelper {
110
110
static boolean setJsseProvider = true ;
111
111
static volatile Provider jsseProvider ;
112
112
113
- /**
114
- * inject under a given name a cipher. also ensures that the registered
115
- * classes are getting used.
116
- *
117
- * @param name the name under which the class gets registered
118
- * @param clazz the CipherSpi class
119
- */
120
- public static void addCipher (String name , Class <? extends CipherSpi > clazz ) {
121
- implEngines .put ("Cipher:" + name , clazz );
122
- tryCipherInternal = true ;
123
- }
124
-
125
- /**
126
- * inject under a given name a signature
127
- *
128
- * @param name the name under which the class gets registered
129
- * @param clazz the SignaturSpi class
130
- */
131
- public static void addSignature (String name , Class <? extends SignatureSpi > clazz ) {
132
- implEngines .put ("Signature:" + name , clazz );
133
- }
134
-
135
113
public static Provider getSecurityProvider () {
136
114
Provider provider = securityProvider ;
137
115
if ( setBouncyCastleProvider && provider == null ) {
Original file line number Diff line number Diff line change @@ -46,24 +46,6 @@ public void disableSecurityProvider() {
46
46
SecurityHelper .setBouncyCastleProvider = false ;
47
47
}
48
48
49
- @ Test
50
- public void injectCipherImpl () throws Exception {
51
- SecurityHelper .addCipher ("fake" , CipherSpiFake .class );
52
- javax .crypto .Cipher cipher = SecurityHelper .getCipher ("fake" );
53
- assertEquals (cipher .getProvider (), savedProvider );
54
- java .lang .reflect .Field spi = cipher .getClass ().getDeclaredField ("spi" );
55
- spi .setAccessible (true );
56
- assertEquals (spi .get (cipher ).getClass (), CipherSpiFake .class );
57
- }
58
-
59
- @ Test
60
- public void injectSignatureImpl () throws Exception {
61
- SecurityHelper .addSignature ("fake" , SignatureSpiFake .class );
62
- Signature signature = SecurityHelper .getSignature ("fake" );
63
- assertEquals (signature .getProvider (), savedProvider );
64
- assertEquals (signature .getClass (), SignatureSpiFake .class );
65
- }
66
-
67
49
@ Test
68
50
public void usesBouncyCastleSecurityProviderByDefault () {
69
51
assertNotNull (SecurityHelper .getSecurityProvider ());
You can’t perform that action at this time.
0 commit comments