public void TestIdemixWrongEnrollment() { HFCAClient client = HFCAClient.Create("client", "http://localhost:99", null); client.CryptoSuite = crypto; IEnrollment enrollment = new IdemixEnrollment(null, null, "mspid", null, null, null, "ou", IdemixRoles.MEMBER); client.IdemixEnroll(enrollment, "mspid"); }
public IUser GetUser(string id) { IdemixMSPSignerConfig signerConfig = ReadIdemixMSPConfig(Path.Combine(mspId, USER_PATH + id)); KeyPair revocationPk = ReadIdemixRevocationPublicKey(mspId); BIG sk = BIG.FromBytes(signerConfig.Sk.ToByteArray()); IdemixCredential cred = new IdemixCredential(Credential.Parser.ParseFrom(signerConfig.Cred)); CredentialRevocationInformation cri = CredentialRevocationInformation.Parser.ParseFrom(signerConfig.CredentialRevocationInformation); IdemixEnrollment enrollment = new IdemixEnrollment(ipk, revocationPk, mspId, sk, cred, cri, signerConfig.OrganizationalUnitIdentifier, (IdemixRoles)signerConfig.Role); return(new IdemixUser(id, mspId, enrollment)); }
public IdemixUser(string name, string mspId, IdemixEnrollment enrollment) { Name = name; MspId = mspId; Enrollment = enrollment; }