🐛 修复x509代码
This commit is contained in:
@@ -47,7 +47,7 @@ public class PemUtils {
|
||||
|
||||
public static X509Certificate loadCertificate(InputStream inputStream) {
|
||||
try {
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X509");
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
X509Certificate cert = (X509Certificate) cf.generateCertificate(inputStream);
|
||||
cert.checkValidity();
|
||||
return cert;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RsaCryptoUtil {
|
||||
Object oldValue = field.get(encryptObject);
|
||||
if (oldValue != null) {
|
||||
String oldStr = (String) oldValue;
|
||||
if (!oldStr.trim().equals("'")) {
|
||||
if (!"".equals(oldStr.trim())) {
|
||||
field.set(encryptObject, encryptOAEP(oldStr, certificate));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user