'Create a new certificate based on the csr.
Return the certificate object as dict
https://tools.ietf.org/html/draft-ietf-acme-acme-02#section-6.5'

def _new_cert(self):

    openssl_csr_cmd = [self._openssl_bin, 'req', '-in', self.csr, '-outform', 'DER']
    (_, out, _) = self.module.run_command(openssl_csr_cmd, check_rc=True)
    new_cert = {'resource': 'new-cert', 'csr': nopad_b64(out)}
    (result, info) = self.account.send_signed_request(self.directory['new-cert'], new_cert)
    if (info['status'] not in [200, 201]):
        self.module.fail_json(msg='Error    new    cert:    CODE:    {0}    RESULT:    {1}'.format(info['status'], result))
    else:
        return {'cert': result, 'uri': info['location']}
