回复: [Hyperledger Fabric] #fabric #fabric-questions #fabric-ca #fabric-ca-client


david liu <david-khala@...>
 

Before you blame it to fabric-ca-client, please help to re-test it again with `fabric-ca-client` command tool. 

发件人: fabric@... <fabric@...> 代表 chauhan.kartik25@... <chauhan.kartik25@...>
发送时间: 2020年2月21日 20:15
收件人: fabric@... <fabric@...>
主题: [Hyperledger Fabric] #fabric #fabric-questions #fabric-ca #fabric-ca-client
 

I tried to register & enroll a user with the name 苏南 on Fabric-CA. The registration is getting successful but getting below error during enrollment.

error: [FabricCAClientService.js]: Failed to enroll 苏南, error:%o message=Enrollment failed with errors [[{"code":0,"message":"asn1: invalid UTF-8 string"}]], stack=Error: Enrollment failed with errors [[{"code":0,"message":"asn1: invalid UTF-8 string"}]]

The error clearly says that the letters are not supported in UTF-8 encoding. Can I change the default encoding while enrolling? If yes, which enoding scheme do I've to use to support Chinese letters?

Also, I tried to create a CSR and then a certificate using OpenSSL utility with Chinese letters in CN(CommonName). I was successfully able to create a certificate. So it seems like the issue is with the fabric-ca-client SDK. Is there any way I can add Chinese letters in a certificate while enrolling a user on Hyperledger Fabric?