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 41a514a
Show file tree
Hide file tree
Showing 2 changed files with 51 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

rss_pss_public_key: <%= ENV['RSS_PSS_PUBLIC_KEY'] %>


# -------------------------------------------------------
# Collection setting
# -------------------------------------------------------
Expand Down
48 changes: 48 additions & 0 deletions _pages/certification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
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>
const url = new URL(window.location);
let jwsCode = document.getElementById('jws-code');
jwsCode.value = url.searchParams.get('code');
loadRSAKeyPair();
parseJWS();
</script>



</head>


<input type="hidden" id="publicKey" value="{{ site.rss_pss_public_key }}">
<input type="hidden" id="jws-code" />


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

<div class="mb-3">
<button id="parse_result" class="btn btn-secondary">검증 결과
</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>

0 comments on commit 41a514a

Please sign in to comment.