feat: HSM main/slave certificate comparison with batch SQL generation

- compare usercert_tab by subject raw bytes + certtype
- generate single annotated CSV report
- generate merge-<timestamp>.sql in current directory for DBA execution
- preserve GBK DN bytes via ATTACH + INSERT OR REPLACE / UPDATE
- compatible with sqlite3 3.6.20 and JDK 1.8
This commit is contained in:
cheney
2026-11-04 15:18:42 +08:00
commit fe28ddeaac
38 changed files with 4952 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# cert-compare 运行配置(UTF-8)
# 主库
db.main=/app/cert-compare/main.db
# 从库
db.slave=/app/cert-compare/slave.db
# subject/issuer 实际为 GBK/GB18030 字节
db.text.encoding=GB18030
# DN 匹配:EXACT(按原始字节)| TRIM(去除整体首尾空白)
dn.match=EXACT
# SN 归一化:HEX(大写+去前导0)| EXACT
sn.normalize=HEX
# 报表目录
report.dir=/app/cert-compare/reports
report.csv.bom=true
# 批量 SQL 脚本直接输出到运行时的当前目录(merge-<时间戳>.sql)