Skip to content

Commit 5660cc2

Browse files
committed
Create: Verify Page
1 parent 1f610ba commit 5660cc2

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-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+
41+
42+
4043
# -------------------------------------------------------
4144
# Collection setting
4245
# -------------------------------------------------------

_pages/certification.html

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
18+
(async () => {
19+
const response = await axios.get("https://gdsc-deu.github.io/assets/rsa_pub.pem");
20+
document.getElementById("publicKey").value = response.data;
21+
22+
loadRSAKeyPair();
23+
24+
const url = new URL(window.location);
25+
const jwsCode = url.searchParams.get("code");
26+
27+
document.getElementById("jws-code").value = jwsCode;
28+
29+
parseJWS();
30+
})();
31+
</script>
32+
33+
34+
35+
</head>
36+
37+
38+
<input type="hidden" id="publicKey" />
39+
<input type="text" id="jws-code" class="form-control" placeholder="JWS Code" oninput="parseJWS()" />
40+
41+
42+
<!-- Json 파싱 결과 -->
43+
<div class="mb-3">
44+
<label for="payload" class="form-label">인증서 내용</label>
45+
<textarea id="payload" class="form-control" rows="5" placeholder="payload"></textarea>
46+
</div>
47+
48+
<div class="mb-3">
49+
<button id="parse_result" class="btn btn-secondary" onclick="parseJWS()">검증 결과
50+
</div>
51+
52+
<div id="download_area" class="d-none">
53+
<!--팝업창 띄우기 -->
54+
<button type="button" class="btn btn-primary" id="download"
55+
onclick="window.open('https://cmsong111.github.io/Digital-Signature-Certification-Generator/gen_cert?data=' + document.getElementById('payload').value, '_blank' );">
56+
<i class="bi bi-download"></i>인증서/상장 다운로드
57+
</div>

assets/rsa_pub.pem

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgsbeqduZq5nK120wYVnX
3+
UvDg5AvVk80iG0SHxIrJQUsbuAohPkj3BBHPh5jQokz35q8pNLPrnDkDpGawPKVD
4+
aNrzCjgTbbpI3WdSLYa97CewJ6YsX471I4g11YevxuhRp55McMuVb2F/C+jzmBPe
5+
FdP6VXqVgkzi98nidWb95JsfYI+zd6a3UCpUAUO5/DXQEmsaWMXcsV2lBPCOTTCy
6+
P169tihxSp+Q3rxBxyYRWfw8hsze1HQh126GDJ6gPYYUD2po0TNBts4Xf8zIcKsS
7+
bs9bDKWOt5Ah0LcyrLVRLiIrbXlTPlPlKN0i1dovouUtk1/we9DopGJkwSWIuDWm
8+
UwIDAQAB
9+
-----END PUBLIC KEY-----

0 commit comments

Comments
 (0)