HFCAClient { public void setCryptoSuite(CryptoSuite cryptoSuite) { this.cryptoSuite = cryptoSuite; } HFCAClient(String caName, String url, Properties properties); String getCAName(); int getStatusCode(); static HFCAClient createNewInstance(String url, Properties properties); static HFCAClient createNewInstance(String name, String url, Properties properties); void setCryptoSuite(CryptoSuite cryptoSuite); CryptoSuite getCryptoSuite(); String register(RegistrationRequest request, User registrar); Enrollment enroll(String user, String secret); Enrollment enroll(String user, String secret, EnrollmentRequest req); HFCAInfo info(); Enrollment reenroll(User user); Enrollment reenroll(User user, EnrollmentRequest req); void revoke(User revoker, Enrollment enrollment, String reason); String revoke(User revoker, Enrollment enrollment, String reason, boolean genCRL); void revoke(User revoker, String revokee, String reason); String revoke(User revoker, String revokee, String reason, boolean genCRL); String generateCRL(User registrar, Date revokedBefore, Date revokedAfter, Date expireBefore, Date expireAfter); HFCAIdentity newHFCAIdentity(String enrollmentID); Collection<HFCAIdentity> getHFCAIdentities(User registrar); HFCAAffiliation newHFCAAffiliation(String name); HFCAAffiliation getHFCAAffiliations(User registrar); static final String DEFAULT_PROFILE_NAME; static final String HFCA_TYPE_PEER; static final String HFCA_TYPE_ORDERER; static final String HFCA_TYPE_CLIENT; static final String HFCA_TYPE_USER; static final String HFCA_ATTRIBUTE_HFREGISTRARROLES; static final String HFCA_ATTRIBUTE_HFREGISTRARDELEGATEROLES; static final String HFCA_ATTRIBUTE_HFREGISTRARATTRIBUTES; static final String HFCA_ATTRIBUTE_HFINTERMEDIATECA; static final String HFCA_ATTRIBUTE_HFREVOKER; static final String HFCA_ATTRIBUTE_HFAFFILIATIONMGR; static final String HFCA_ATTRIBUTE_HFGENCRL; }
@Test public void testSetCryptoSuite() throws Exception { HFCAClient client = HFCAClient.createNewInstance("client", "http: CryptoPrimitives testcrypt = new CryptoPrimitives(); client.setCryptoSuite(testcrypt); Assert.assertEquals(testcrypt, client.getCryptoSuite()); }