public byte [ ] createCertificateRequest ( X509Name subjectDN , String sigAlgName , KeyPair keyPair ) throws GeneralSecurityException { DERSet attrs = null ; PKCS10CertificationRequest certReq = null ; certReq = new PKCS10CertificationRequest ( sigAlgName , subjectDN , keyPair . getPublic ( ) , attrs , keyPair . getPrivate ( ) ) ; return certReq . getEncoded ( ) ; }
Creates a certificate request from the specified subject name signing algorithm and a key pair .