Reputation: 270
I am following the instructions in the docs to generate an ecert with test attributes. But I am not being able to do it. I am using fabric-ca-client version 1.1.0-preview which according to this issue, should have support for attribute certificates (I have also tried more recent versions).
What I do:
Enroll the admin:
$ export FABRIC_CA_CLIENT_HOME=/etc/hyperledger/fabric-ca; fabric-ca-client enroll -u http://admin:adminpw@localhost:7054
Register the client:
$ fabric-ca-client register --id.name user1 --id.secret user1pw --id.type user --id.affiliation org1 --id.attrs attr1=val1:ecert
Enroll the client:
$ export FABRIC_CA_CLIENT_HOME=/etc/hyperledger/fabric-ca/clients/user1; fabric-ca-client enroll -u http://user1:user1pw@localhost:7054
But then, openssl x509 -in /etc/hyperledger/fabric-ca/clients/user1/msp/signcerts/cert.pem -text -noout shows a certificate without attributes.
Questions:
Thanks.
Upvotes: 0
Views: 791
Reputation: 270
Solved.
It turns out I was not using fabric-ca-client version 1.1.0-preview. With that version, the sequence of commands in the question correctly generate certificates with attributes.
Upvotes: 1