issuing_certificates - Trainees-travelling-Open-Source-Sea/cert-issuer GitHub Wiki

issuing certificates

1. docker(์†Œํ”„ํŠธ์›จ์–ด ๊ฐ€์ƒํ™” ํ”„๋กœ๊ทธ๋žจ) ์‹คํ–‰

docker run -it bc/cert-issuer:1.0 bash  

run
๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•˜์—ฌ docker๋ฅผ ์‹คํ–‰ํ•œ ๋ชจ์Šต์ด๋‹ค.

2. issuing address

issuer=`bitcoin-cli getnewaddress`  
sed -i.bak "s/<issuing-address>/$issuer/g" /etc/cert-issuer/conf.ini  
bitcoin-cli dumpprivkey $issuer > /etc/cert-issuer/pk_issuer.txt  

01

3. issuing certificates

cp /cert-issuer/examples/data-testnet/unsigned_certificates/3bc1a96a-3501-46ed-8f75-49612bbac257.json /etc/cert-issuer/data/unsigned_certificates/  
cp <cert-issuer-home>/data/unsigned_certificates/<your-cert-guid>.json /etc/cert-issuer/data/unsigned_certificates/  
# ์œ„์˜ ๋ช…๋ น์–ด๋Š” unsigned certificate๋ฅผ ์ด์šฉํ•˜์—ฌ ๋น„ํŠธ์ฝ”์ธ์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค€๋‹ค.  

image

4. generating bitcoin

bitcoin-cli generate 101  

03

5. send the money to your issuing address

bitcoin-cli sendtoaddress $issuer 5

04

6. issue the certificates on the blockchain

cert-issuer -c /etc/cert-issuer/conf.ini

05

7. /etc/cert-issuer/data/blockchain_certificates ์— ์œ„์น˜ํ•˜๋Š” ๋ธ”๋ก ์ฒด์ธ ์ธ์ฆ์„œ๋ฅผ cert_viewer ์•ˆ์— ์žˆ๋Š” cert_data ํด๋”๋กœ ์˜ฎ๊ธด๋‹ค์Œ ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•˜๋ฉด docker containerId๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

docker ps  // shows the docker containderId  
docker cp <containerId>:/etc/cert-issuer/data/blockchain_certificates <localPath>/cert-viewer/cert_data  

06

โš ๏ธ **GitHub.com Fallback** โš ๏ธ