use of com.github.zhenwei.core.asn1.pkcs.CertificationRequest in project interlok by adaptris.
the class CertRequestHandler method createRequest.
/**
* Create a CertificateRequest based on the provided certificate and write it
* to the supplied outputStream.
* <p>
* The default implementation writes out the request as a DER encoded ASN.1
* data structure
*
* @param c the certificate
* @param out the OutputStream to write to
* @param key the Private key
* @throws AdaptrisSecurityException if any error occurs
* @see AdaptrisSecurityException
*/
public static void createRequest(Certificate c, PrivateKey key, OutputStream out) throws AdaptrisSecurityException {
try {
CertificationRequest req = createCertRequest(c, key);
out.write(req.getEncoded());
} catch (Exception e) {
throw new CertException(e);
}
}
Aggregations