Generate certificate with permission.