} catch (OpsException e) {
log.warn("Error while signing CSR", e);
throwInternalError();
}
SignCertificateResponse response = new SignCertificateResponse();
response.certificates = Lists.newArrayList();
for (X509Certificate cert : certificates) {
response.certificates.add(CertificateUtils.toPem(cert));
}