1
0
mirror of synced 2025-12-16 03:57:56 +08:00

🐛 修复x509代码

This commit is contained in:
sanjun
2022-07-26 11:46:12 +08:00
committed by GitHub
parent 0cfcc8d4a0
commit 5a2607787f
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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));
}
}