Skip to content

Commit

Permalink
Create: Verify Page
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsong111 committed Jul 31, 2024
1 parent 1f610ba commit 5134edb
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ timezone: Asia/Seoul
# 작성일이 미래라도 빌드할 것인지 여부
future : true




# -------------------------------------------------------
# Collection setting
# -------------------------------------------------------
Expand Down
55 changes: 55 additions & 0 deletions _pages/certification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
layout: default
title: Certification
permalink: /certification
---


<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsrsasign/11.1.0/jsrsasign-all-min.js"
integrity="sha512-Eu9j+HZBor7muHf6IDWoWZ8FKVr6nKe9eIIVR28NEte4Y4GiYRlke26XGdR/re81XE/FfLoLYYVkvNk5GY9RvQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<!-- my js -->
<script src="https://cmsong111.github.io/Digital-Signature-Certification-Generator/assets/js/signature.js"></script>

<script>

(async () => {
const response = await axios.get("https://gdsc-deu.github.io/assets/rsa_pub.pem");
document.getElementById("publicKey").value = response.data;

loadRSAKeyPair();

const url = new URL(window.location);
const jwsCode = url.searchParams.get("code");

document.getElementById("jws-code").value = jwsCode;
})();
</script>



</head>


<input type="hidden" id="publicKey" />
<input type="text" id="jws-code" class="form-control" placeholder="JWS Code" onchange="parseJWS()" />


<!-- Json 파싱 결과 -->
<div class="mb-3">
<label for="payload" class="form-label">인증서 내용</label>
<textarea id="payload" class="form-control" rows="5" placeholder="payload"></textarea>
</div>

<div class="mb-3">
<button id="parse_result" class="btn btn-secondary" onclick="parseJWS()">검증 결과
</div>

<div id="download_area" class="d-none">
<!--팝업창 띄우기 -->
<button type="button" class="btn btn-primary" id="download"
onclick="window.open('https://cmsong111.github.io/Digital-Signature-Certification-Generator/gen_cert?data=' + document.getElementById('payload').value, '_blank' );">
<i class="bi bi-download"></i>인증서/상장 다운로드
</div>
9 changes: 9 additions & 0 deletions assets/rsa_pub.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgsbeqduZq5nK120wYVnX
UvDg5AvVk80iG0SHxIrJQUsbuAohPkj3BBHPh5jQokz35q8pNLPrnDkDpGawPKVD
aNrzCjgTbbpI3WdSLYa97CewJ6YsX471I4g11YevxuhRp55McMuVb2F/C+jzmBPe
FdP6VXqVgkzi98nidWb95JsfYI+zd6a3UCpUAUO5/DXQEmsaWMXcsV2lBPCOTTCy
P169tihxSp+Q3rxBxyYRWfw8hsze1HQh126GDJ6gPYYUD2po0TNBts4Xf8zIcKsS
bs9bDKWOt5Ah0LcyrLVRLiIrbXlTPlPlKN0i1dovouUtk1/we9DopGJkwSWIuDWm
UwIDAQAB
-----END PUBLIC KEY-----

0 comments on commit 5134edb

Please sign in to comment.