Configuration issue in Cert-issuer (github)


#1

Hi Team,
I’m using windows platform.
bitcoin-cli getnewaddress’ how address are getting generated…?
How to get pk_issuer.txt…?
I created an account in blockhain.com, I got bitcoin address , when I try to dump the pk_issuer with my bitcoin address it showing address does not refer to key.
I installed bitcoin-cli using npm, when I tried to execute " bitcoin-cli dumbkey $issuer ‘pk_issuer.txt’ " , I’m getting this error "Error: Bitcoin Core JSON-RPC: host=127.0.0.1 port=8332: Request Error: connect ECONNREFUSED 127.0.0.1:8332
"
I need this cert-issuer as a web API, I tried my best but I’m not able to configure.
Please help me in this,
Thanks in advance.


#2

This should be all you need to do to generate a new public / private keypair:

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

If you’re bringing in your own keys, then you need to set the public key in place of <issuing-address> in /etc/cert-issuer/conf.ini and you need to create the /etc/cert-issuer/pk_issuer.txt file with your private key as the contents.


#5

Thanks for your valuable reply.
Can you tell me how to create pk_issuer.
I tried by giving my own address, but not working.:persevere:
Error message : "Address does not refer to key"
Even I got a reference from this https://bitcoincore.org/en/doc/0.17.0/rpc/wallet/dumpprivkey/


#6

dumpprivkey only works if you’ve created the key via bitcoin-cli getnewaddress. You can’t create a private key from any public key, it has to do a lookup to find the private key for the keypair it generated.

Either use the commands I posted exactly as I posted them, or figure out how to get the private key through whatever method you’re generating your own keys. Once you have the private key, stick it into the pk_issuer.txt file.


#7

Okay,now I got it.
I have few questions to ask!

  1. If I generate the address using the commands which you posted before, when I issue the certificates it is asking some 133300 satoshi.
    If I want to add bitcoins for that address then how to add that… ?

  2. In bitcoin.conf, I have configuration like this ‘–rpcuser=foo --rpcpassword=Bala@0514 --rpcport=8332regtest=1 --relaypriority=0 --rpcallowip=127.0.0.1 --rpcconnect=127.0.0.1’, how to connect with bitcoin mainnet, where can I get my rpc username and password…?

  3. What does rpc username and password exactly means…?

  4. If rpc is blockchain wallet credentials, when I use that credentials, will address generated by ‘bitcoin-cli getnewaddress’ map with my blockchain wallet…?

  5. More simple, certificates generated,issued, signed everything should store in my blockchain wallet, is this possible…?