File tree 2 files changed +5
-4
lines changed
prov/src/main/java/org/bouncycastle
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 34
34
import org .bouncycastle .asn1 .ASN1InputStream ;
35
35
import org .bouncycastle .asn1 .x509 .CertificatePair ;
36
36
import org .bouncycastle .jce .X509LDAPCertStoreParameters ;
37
+ import org .bouncycastle .util .Strings ;
37
38
38
39
/**
39
40
* This is a general purpose implementation to get X.509 certificates and CRLs
@@ -126,8 +127,7 @@ private DirContext connectLDAP()
126
127
private String parseDN (String subject , String subjectAttributeName )
127
128
{
128
129
String temp = subject ;
129
- int begin = temp .toLowerCase ().indexOf (
130
- subjectAttributeName .toLowerCase ());
130
+ int begin = Strings .toLowerCase (temp ).indexOf (Strings .toLowerCase (subjectAttributeName ));
131
131
temp = temp .substring (begin + subjectAttributeName .length ());
132
132
int end = temp .indexOf (',' );
133
133
if (end == -1 )
Original file line number Diff line number Diff line change 36
36
import org .bouncycastle .jce .provider .X509CertPairParser ;
37
37
import org .bouncycastle .jce .provider .X509CertParser ;
38
38
import org .bouncycastle .util .StoreException ;
39
+ import org .bouncycastle .util .Strings ;
39
40
import org .bouncycastle .x509 .X509AttributeCertStoreSelector ;
40
41
import org .bouncycastle .x509 .X509AttributeCertificate ;
41
42
import org .bouncycastle .x509 .X509CRLStoreSelector ;
@@ -113,8 +114,8 @@ private DirContext connectLDAP() throws NamingException
113
114
private String parseDN (String subject , String dNAttributeName )
114
115
{
115
116
String temp = subject ;
116
- int begin = temp .toLowerCase ().indexOf (
117
- dNAttributeName .toLowerCase () + "=" );
117
+ int begin = Strings .toLowerCase (temp ).indexOf (
118
+ Strings .toLowerCase (dNAttributeName ) + "=" );
118
119
if (begin == -1 )
119
120
{
120
121
return "" ;
You can’t perform that action at this time.
0 commit comments