@Test public void createCsrFilename() { SecurityServerId securityServerId = SecurityServerId.create("I", "MEMCLASS", "MEMCODE", "SERVERCODE"); ClientId memberId = ClientId.create("I", "MEMCLASS", "MEMCODE", null); String authFilename = csrFilenameCreator.createCsrFilename(KeyUsageInfo.AUTHENTICATION, CertificateRequestFormat.PEM, memberId, securityServerId); assertEquals("auth_csr_" + DATE + "_securityserver_I_MEMCLASS_MEMCODE_SERVERCODE.pem", authFilename); String signFilename = csrFilenameCreator.createCsrFilename(KeyUsageInfo.SIGNING, CertificateRequestFormat.DER, memberId, securityServerId); assertEquals("sign_csr_" + DATE + "_member_I_MEMCLASS_MEMCODE.der", signFilename); }
public String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat, ClientId memberId, SecurityServerId securityServerId) { StringBuilder builder = new StringBuilder(); if (KeyUsageInfo.AUTHENTICATION == keyUsageInfo) { builder.append("auth"); } else { builder.append("sign"); } builder.append("_csr_"); builder.append(createDateString()); builder.append("_"); builder.append(createIdentifier(keyUsageInfo, memberId, securityServerId)); builder.append("."); builder.append(csrFormat.name().toLowerCase()); return builder.toString(); }
CsrFilenameCreator { public String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat, ClientId memberId, SecurityServerId securityServerId) { StringBuilder builder = new StringBuilder(); if (KeyUsageInfo.AUTHENTICATION == keyUsageInfo) { builder.append("auth"); } else { builder.append("sign"); } builder.append("_csr_"); builder.append(createDateString()); builder.append("_"); builder.append(createIdentifier(keyUsageInfo, memberId, securityServerId)); builder.append("."); builder.append(csrFormat.name().toLowerCase()); return builder.toString(); } }
CsrFilenameCreator { public String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat, ClientId memberId, SecurityServerId securityServerId) { StringBuilder builder = new StringBuilder(); if (KeyUsageInfo.AUTHENTICATION == keyUsageInfo) { builder.append("auth"); } else { builder.append("sign"); } builder.append("_csr_"); builder.append(createDateString()); builder.append("_"); builder.append(createIdentifier(keyUsageInfo, memberId, securityServerId)); builder.append("."); builder.append(csrFormat.name().toLowerCase()); return builder.toString(); }  }
CsrFilenameCreator { public String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat, ClientId memberId, SecurityServerId securityServerId) { StringBuilder builder = new StringBuilder(); if (KeyUsageInfo.AUTHENTICATION == keyUsageInfo) { builder.append("auth"); } else { builder.append("sign"); } builder.append("_csr_"); builder.append(createDateString()); builder.append("_"); builder.append(createIdentifier(keyUsageInfo, memberId, securityServerId)); builder.append("."); builder.append(csrFormat.name().toLowerCase()); return builder.toString(); }  String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat,
            ClientId memberId, SecurityServerId securityServerId); String createInternalCsrFilename(); }
CsrFilenameCreator { public String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat, ClientId memberId, SecurityServerId securityServerId) { StringBuilder builder = new StringBuilder(); if (KeyUsageInfo.AUTHENTICATION == keyUsageInfo) { builder.append("auth"); } else { builder.append("sign"); } builder.append("_csr_"); builder.append(createDateString()); builder.append("_"); builder.append(createIdentifier(keyUsageInfo, memberId, securityServerId)); builder.append("."); builder.append(csrFormat.name().toLowerCase()); return builder.toString(); }  String createCsrFilename(KeyUsageInfo keyUsageInfo, CertificateRequestFormat csrFormat,
            ClientId memberId, SecurityServerId securityServerId); String createInternalCsrFilename(); static final String INTERNAL_CSR_FILE_PREFIX; static final String INTERNAL_CSR_FILE_EXTENSION; }