Skip to content

Commit d3c1f21

Browse files
committed
Create: Verify Page
1 parent 1f610ba commit d3c1f21

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

_config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ timezone: Asia/Seoul
3737
# 작성일이 미래라도 빌드할 것인지 여부
3838
future : true
3939

40+
rss_pss_public_key: <%= ENV['RSS_PSS_PUBLIC_KEY'] %>
41+
42+
4043
# -------------------------------------------------------
4144
# Collection setting
4245
# -------------------------------------------------------

_pages/certification.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
layout: default
3+
title: Certification
4+
permalink: /certification
5+
---
6+
7+
8+
<head>
9+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsrsasign/11.1.0/jsrsasign-all-min.js"
10+
integrity="sha512-Eu9j+HZBor7muHf6IDWoWZ8FKVr6nKe9eIIVR28NEte4Y4GiYRlke26XGdR/re81XE/FfLoLYYVkvNk5GY9RvQ=="
11+
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
12+
13+
<!-- my js -->
14+
<script src="https://cmsong111.github.io/Digital-Signature-Certification-Generator/assets/js/signature.js"></script>
15+
16+
<script>
17+
const url = new URL(window.location);
18+
let jwsCode = document.getElementById('jws-code');
19+
jwsCode.value = url.searchParams.get('code');
20+
loadRSAKeyPair();
21+
parseJWS();
22+
</script>
23+
24+
25+
26+
</head>
27+
28+
29+
<input type="hidden" id="publicKey" value="{{ site.rss_pss_public_key }}">
30+
<input type="hidden" id="jws-code" />
31+
32+
33+
<!-- Json 파싱 결과 -->
34+
<div class="mb-3">
35+
<label for="payload" class="form-label">인증서 내용</label>
36+
<textarea id="payload" class="form-control" rows="5" placeholder="payload" readonly></textarea>
37+
</div>
38+
39+
<div class="mb-3">
40+
<button id="parse_result" class="btn btn-secondary">검증 결과
41+
</div>
42+
43+
<div id="download_area" class="d-none">
44+
<!--팝업창 띄우기 -->
45+
<button type="button" class="btn btn-primary" id="download"
46+
onclick="window.open('https://cmsong111.github.io/Digital-Signature-Certification-Generator/gen_cert?data=' + document.getElementById('payload').value, '_blank' );">
47+
<i class="bi bi-download"></i>인증서/상장 다운로드
48+
</div>

0 commit comments

Comments
 (0)