public final class CertRequestHandler
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createRequest(java.security.cert.Certificate c,
java.security.PrivateKey key)
Create a certificate request based on the provided certificate.
|
static void |
createRequest(java.security.cert.Certificate c,
java.security.PrivateKey key,
java.io.OutputStream out)
Create a CertificateRequest based on the provided certificate and write it
to the supplied outputStream.
|
public static java.lang.String createRequest(java.security.cert.Certificate c, java.security.PrivateKey key) throws AdaptrisSecurityException
The certificate request is returned as a printable string.
The default implementation returns a PEM string which is bounded by -----BEGIN NEW CERTIFICATE REQUEST-----
and
-----END NEW CERTIFICATE REQUEST-----
with each line terminated by a \n, e.g.
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIC1zCCAb8CAQAwgZMxGTAXBgNVBAMTEEdoaWxhaW5lIFd5bnlhcmQxFTATBgNV
BAsTDElyaXMgU3VwcG9ydDENMAsGA1UEChMESXJpczEQMA4GA1UEBxMHRGF0Y2hl
dDESMBAGA1UECBMJQmVya3NoaXJlMQswCQYDVQQGEwJVSzEdMBsGCSqGSIb3DQEJ
ARYOZ2x3QGlyaXMuY28udWswggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQCRQMSX5HCu25aQ+dtozxoGP1QtYC6JXuyGQkQ2MX2JsF1y+WM4NWUvhZvCKjmg
jsQL2c/rBzXifZCDRzMuHymOcmWXBaFJJr3b2XZQykzhKZKvTx6X1oU7PPcf+ws0
fNRQ3c1ZekPRYTUmSKyswJwIJDmpx4folU348taHwqcnK/LizekgjwrcZwSmFkk6
zhGTji2Ris4NMGvm/gDPGGmstxXTQIT62zOP1c61IhkKqxTtMZqmuB2HgQ8MRAza
xAxm7uoGbSCgUrWOjb92BHYxvQw8LKKkqKmKWRmDPPQKlBP4iR7vPUqXlb4G/keN
jR2EdByCJbkCUCwuVU124lJbAgMBAAEwDQYJKoZIhvcNAQEEBQADggEBADHpHomV
ZItNOeXjBDQGWNX9SpA9QV5IvEzm4u5mRI+XFsgYXvybeLMYC6Vrpxl9INVI6hpx
Nblq09Cq8lHQusyJNVEW3ibc73T5OZrCSnPTD7DUoKpwLwkDOwze7NHu+7NceUm1
pHCdiVe9Q3AC3+qlIdOhXGB3L5/Tn+8rYFNMAV8TQl7yRAz0g4lm+CdXQWaozTLY
/1MifSidgYoOq2lCE6l6JsVUv7mBTgaA52GuL0XvfopMOJrEuVUfFy7xVZMqD92L
ThcZUaIq5/Z3PUGLi8txXXb0Ga81SkLAHpBljgED0pV06EsrDz/N+12aH75zDcE+
Odt/GdYzfpeYvBg=
-----END NEW CERTIFICATE REQUEST-----
c
- the certificatekey
- the private keyAdaptrisSecurityException
- if any error occursAdaptrisSecurityException
public static void createRequest(java.security.cert.Certificate c, java.security.PrivateKey key, java.io.OutputStream out) throws AdaptrisSecurityException
The default implementation writes out the request as a DER encoded ASN.1 data structure
c
- the certificateout
- the OutputStream to write tokey
- the Private keyAdaptrisSecurityException
- if any error occursAdaptrisSecurityException