Skip to content

Commit

Permalink
[FAB-9244] 5.Client changes to get Idemix credential
Browse files Browse the repository at this point in the history
This change set includes client side changes for getting
Idemix credential. Changes include:

1. Credential interface and implementation for X509
and Idemix credentials
2. Changes to the Client to handle send Idemix enrollment
request and handle the response from the server

Change-Id: I732883cd2949c72600c4348ca292cb60369315bd
Signed-off-by: Anil Ambati <[email protected]>
  • Loading branch information
Anil Ambati committed May 17, 2018
1 parent 84653b2 commit c44f5e1
Show file tree
Hide file tree
Showing 21 changed files with 1,579 additions and 301 deletions.
22 changes: 6 additions & 16 deletions cmd/fabric-ca-client/command/main_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
/*
Copyright IBM Corp. 2017 All Rights Reserved.
Copyright IBM Corp. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0
*/

package command
Expand Down Expand Up @@ -2464,11 +2454,11 @@ func registerAndRevokeUsers(t *testing.T, admin *lib.Identity, num int) []*big.I
t.Fatalf("Failed to enroll the identity '%s': %s", userName, err)
}

cert, err := enrollResp.Identity.GetECert().GetX509Cert()
if err != nil {
t.Fatalf("Failed to get enrollment certificate for the user %s: %s", userName, err)
x509Cred := enrollResp.Identity.GetECert()
if x509Cred == nil || x509Cred.GetX509Cert() == nil {
t.Fatalf("Failed to get enrollment certificate for the user %s", userName)
}

cert := x509Cred.GetX509Cert()
revokeReq := &api.RevocationRequest{}
if i%2 == 0 {
revokeReq.Name = userName
Expand Down
Loading

0 comments on commit c44f5e1

Please sign in to comment.