Fabric-CA-сервер не может начать с конфигурации softthsm - PullRequest
0 голосов
/ 12 октября 2018

Я включил PKCS11 в фабрике ca, но при собственном запуске Fabric-CA-Server выдает ошибку ниже.Обратите внимание, что он работает нормально с параметром SW по умолчанию.

  1. Извлечь Fabric-CA v1.3.0
  2. Обновить свойство BCCSP, как показано ниже

bccsp: по умолчанию: PKCS11 pkcs11: библиотека: /usr/local/lib/softhsm/libsofthsm2.so pin: daily123 label: org1label hash: безопасность SHA2: 256 filekeystore: # Каталог, используемый для хранилища ключей на основе программного файла: msp / keystore

Запустить сервер с помощью команды ./fabric-ca-server start -b admin: adminpw -d

Ошибка 2018/10/12 07:27:01 [INFO] Configuration file location: /opt/gopath/bin/fabric-ca-server-config.yaml 2018/10/12 07:27:01 [INFO] Starting server in home directory: /opt/gopath/bin 2018/10/12 07:27:01 [INFO] Server Version: 1.3.0 2018/10/12 07:27:01 [INFO] Server Levels: &{Identity:1 Affiliation:1 Certificate:1 Credential:1 RAInfo:1 Nonce:1} 2018/10/12 07:27:01 [DEBUG] Making server filenames absolute 2018/10/12 07:27:01 [DEBUG] Initializing default CA in directory /opt/gopath/bin 2018/10/12 07:27:01 [DEBUG] Init CA with home /opt/gopath/bin and config {Version:1.3.0 Cfg:{Identities:{AllowRemove:false} Affiliations:{AllowRemove:false}} CA:{Name: Keyfile: Certfile:ca-cert.pem Chainfile:ca-chain.pem} Signing:0xc4204ce7d0 CSR:{CN:fabric-ca-server Names:[{C:US ST:North Carolina L: O:Hyperledger OU:Fabric SerialNumber:}] Hosts:[safenet localhost] KeyRequest:0xc4204b1ac0 CA:0xc4204b1b40 SerialNumber:} Registry:{MaxEnrollments:-1 Identities:[{ Name:**** Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.Registrar.Roles:* hf.Registrar.DelegateRoles:* hf.Revoker:1 hf.IntermediateCA:1 hf.GenCRL:1 hf.Registrar.Attributes:* hf.AffiliationMgr:1] }]} Affiliations:map[org2:[department1] org1:[department1 department2]] LDAP:{ Enabled:false URL:ldap://****:****@<host>:<port>/<base> UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }} } DB:{ Type:sqlite3 Datasource:fabric-ca-server.db TLS:{false [] { }} } CSP:0xc4204de060 Client:<nil> Intermediate:{ParentServer:{ URL: CAName: } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** CAName: AttrReqs:[] Profile: Label: CSR:<nil> Type:x509 }} CRL:{Expiry:24h0m0s} Idemix:{IssuerPublicKeyfile: IssuerSecretKeyfile: RevocationPublicKeyfile: RevocationPrivateKeyfile: RHPoolSize:1000 NonceExpiration:15s NonceSweepInterval:15m}} 2018/10/12 07:27:01 [DEBUG] CA Home Directory: /opt/gopath/bin 2018/10/12 07:27:01 [DEBUG] Checking configuration file version '1.3.0' against server version: '1.3.0' 2018/10/12 07:27:01 [DEBUG] Initializing BCCSP: &{ProviderName:PKCS11 SwOpts:<nil> PluginOpts:<nil>} 2018/10/12 07:27:01 [DEBUG] Closing server DBs Error: Failed to initialize BCCSP Factories: %!s(<nil>) Could not find default PKCS11 BCCSP

Ответы [ 2 ]

0 голосов
/ 06 августа 2019

Если вы используете базу кода fabric-ca 1.3, следуйте приведенным ниже инструкциям, чтобы она заработала

GO_TAGS=pkcs11 make fabric-ca-server

, обновите fabric-ca-server-config.yaml с помощью данных softHSM, таких как токен, метка, пин-код, библиотека (следуйте здесь https://hyperledger -fabric-ca.readthedocs.io / en / release-1.3 / users-guide.html # configuring-fabric-ca-server-to-use-softhsm2 )

перезапустить матрицу-ca сервер с fabric-ca-server start -b admin:adminpw

фабрика-сервер перезагружается, как и ожидалось.

0 голосов
/ 16 октября 2018

Он отлично работает с последними изображениями Fabric-CA (на данный момент последняя версия 1.4.0-snapshot-cb7353f).

...