导出公钥和证书
This commit is contained in:
@@ -43,12 +43,12 @@ public interface AppCertMapper extends BaseMapper<AppCert> {
|
||||
return certs.iterator().next();
|
||||
}
|
||||
|
||||
default AppCert selectEncBySubject(String dn) {
|
||||
default AppCert selectByTypeAndDn(String type,String dn) {
|
||||
Assert.hasText(dn, "证书序列号不能为空");
|
||||
String subject = Subject.fromDN(dn).getDN();
|
||||
List<AppCert> certs = selectList(new LambdaQueryWrapper<AppCert>()
|
||||
.eq(AppCert::getSubject, subject)
|
||||
.eq(AppCert::getCertType, KeyUsage.ENCRYPT_DECRYPT.getCode())
|
||||
.eq(AppCert::getCertType, type)
|
||||
);
|
||||
if (CollectionUtils.isEmpty(certs)) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user