Package com.sonatype.nexus.ssl.client

Examples of com.sonatype.nexus.ssl.client.Certificate.fingerprint()


    final Certificate certificate = certificates().get("localhost", httpServer.getPort());

    assertThat(certificate, is(notNullValue()));
    assertThat(certificate.pem(), is(notNullValue()));
    assertThat(certificate.fingerprint(), is("CB:11:54:75:02:87:33:42:54:33:7D:2E:10:48:D7:4E:AE:BB:5C:90"));
  }

  /**
   * Verify that in case of retrieving certificate from an non https host, we get a specific exception.
   */
 
View Full Code Here


    final Certificate certificate = certificates().get(proxyRepository.id());

    assertThat(certificate, is(notNullValue()));
    assertThat(certificate.pem(), is(notNullValue()));
    assertThat(certificate.fingerprint(), is("CB:11:54:75:02:87:33:42:54:33:7D:2E:10:48:D7:4E:AE:BB:5C:90"));
  }

  /**
   * Verify that we can retrieve certificate from a repository with a CA signed certificate.
   */
 
View Full Code Here

    final Certificate certificate = certificates().get(proxyRepository.id());

    assertThat(certificate, is(notNullValue()));
    assertThat(certificate.pem(), is(notNullValue()));
    assertThat(certificate.fingerprint(), is("61:96:33:FA:AF:52:1C:EC:D5:97:CF:CC:C3:CE:15:20:F9:CC:22:6B"));
  }

  /**
   * Verify certificate details got from a certificate in PEM format.
   */
 
View Full Code Here

    final Certificate certificate = certificates().getDetails(
        FileUtils.readFileToString(testData().resolveFile("pem.txt"))
    );
    assertThat(certificate, is(notNullValue()));
    assertThat(certificate.pem(), is(notNullValue()));
    assertThat(certificate.fingerprint(), is("19:08:03:84:0E:1D:0E:46:05:D4:17:50:5D:A1:FA:34:36:6E:06:C1"));
  }

  /**
   * Verify that we can retrieve certificate from a mail server host:port.
   */
 
View Full Code Here

        "localhost", mailServer.getSmtps().getPort(), ServerSetup.PROTOCOL_SMTPS
    );

    assertThat(certificate, is(notNullValue()));
    assertThat(certificate.pem(), is(notNullValue()));
    assertThat(certificate.fingerprint(), is("F2:E7:5A:B6:BC:46:17:AB:54:8E:6E:35:23:62:6E:38:A5:28:62:D6"));
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.