@Test public void testMember() { RootCertificate root = CertificateAuthority.mint(dn().setCn("test-ca.com") .setO("World Company") .setOu("IT dep") .setSt("CA") .setC("US") .build(), 10_000, 0.012, 25, ""); assertNotNull(root); CertificateAuthority ca = new CertificateAuthority(root); final CSR csr = createCsr().generateRequest(dn().setCn("test.com") .setL("1638:1639:1640") .setO("World Company") .setOu("IT dep") .setSt("CA") .setC("US") .build()); Certificate certificate = ca.mintNode(csr); FirefliesParameters parameters = new FirefliesParameters(root.getX509Certificate()); Member m = new Member(certificate.getX509Certificate(), parameters); InetSocketAddress address = m.getFirefliesEndpoint(); assertEquals("test.com", address.getHostName()); assertEquals(0x666, address.getPort()); UUID id = m.getId(); assertNotNull(id); }
public Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters, byte[] certificateHash) { this(c, derEncodedCertificate, parameters, certificateHash, portsFrom(c)); }
Member implements Comparable<Member> { public Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters, byte[] certificateHash) { this(c, derEncodedCertificate, parameters, certificateHash, portsFrom(c)); } }
Member implements Comparable<Member> { public Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters, byte[] certificateHash) { this(c, derEncodedCertificate, parameters, certificateHash, portsFrom(c)); } Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash);  Member(X509Certificate c, FirefliesParameters parameters); protected  Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash, InetSocketAddress[] boundPorts); }
Member implements Comparable<Member> { public Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters, byte[] certificateHash) { this(c, derEncodedCertificate, parameters, certificateHash, portsFrom(c)); } Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash);  Member(X509Certificate c, FirefliesParameters parameters); protected  Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash, InetSocketAddress[] boundPorts); static UUID getMemberId(X509Certificate c); static InetSocketAddress[] portsFrom(X509Certificate certificate); static Uuid uuidBits(UUID id); @Override int compareTo(Member o); @Override boolean equals(Object obj); InetSocketAddress getAvalancheEndpoint(); X509Certificate getCertificate(); Instant getFailedAt(); InetSocketAddress getFirefliesEndpoint(); InetSocketAddress getGhostEndpoint(); InetAddress getHost(); UUID getId(); @Override int hashCode(); HashKey hashFor(int ring); boolean isFailed(); boolean isLive(); @Override String toString(); }
Member implements Comparable<Member> { public Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters, byte[] certificateHash) { this(c, derEncodedCertificate, parameters, certificateHash, portsFrom(c)); } Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash);  Member(X509Certificate c, FirefliesParameters parameters); protected  Member(X509Certificate c, byte[] derEncodedCertificate, FirefliesParameters parameters,
            byte[] certificateHash, InetSocketAddress[] boundPorts); static UUID getMemberId(X509Certificate c); static InetSocketAddress[] portsFrom(X509Certificate certificate); static Uuid uuidBits(UUID id); @Override int compareTo(Member o); @Override boolean equals(Object obj); InetSocketAddress getAvalancheEndpoint(); X509Certificate getCertificate(); Instant getFailedAt(); InetSocketAddress getFirefliesEndpoint(); InetSocketAddress getGhostEndpoint(); InetAddress getHost(); UUID getId(); @Override int hashCode(); HashKey hashFor(int ring); boolean isFailed(); boolean isLive(); @Override String toString(); static final String PORT_TEMPLATE; static final String RING_HASH_ALGORITHM; }