what is the difference between getCaName() and getName() method in CertificateAuthority class for fabric-client module?

Viewed 59

I was reading the docs provided for fabric-client and stumbled upon

Here, it states getCaName() method returns CA name of Certificate Authority, while getCaName() returns name of Certificate Authority.

What is the difference between these two? and how is Name and CA name of the Certificate Authority different from each other? Thanks in advance

1 Answers

They are intended for different purposes. It also looks the the docs for the constructor do not show the optional parameters (which include caname as well as name).

getName() returns the value of the name parameter passed into the constructor and is basically just any name you want to give to the CA in order to identify it.

getCaName() returns the value of the caname parameter passed into the constructor and should match the ca.name property which is set when running multiple CA instances within the same fabric-ca process.

Related