code: def generate_certificate(self, common_name, public_key_algorithm='rsa',
              signature_algorithm='rsa_sha_512', key_length=2048,
              signing_ca=None):
          
          return GatewayCertificate._create(self, common_name, public_key_algorithm,
              signature_algorithm, key_length, signing_ca)
docs: Generate an internal gateway certificate used for VPN on this engine.
          Certificate request should be an instance of VPNCertificate.
  
          :param: str common_name: common name for certificate
          :param str public_key_algorithm: public key type to use. Valid values
              rsa, dsa, ecdsa.
          :param str signature_algorithm: signature algorithm. Valid values
              dsa_sha_1, dsa_sha_224, dsa_sha_256, rsa_md5, rsa_sha_1, rsa_sha_256,
              rsa_sha_384, rsa_sha_512, ecdsa_sha_1, ecdsa_sha_256, ecdsa_sha_384,
              ecdsa_sha_512. (Default: rsa_sha_512)
          :param int key_length: length of key. Key length depends on the key
              type. For example, RSA keys can be 1024, 2048, 3072, 4096. See SMC
              documentation for more details.
          :param str,VPNCertificateCA signing_ca: by default will use the
              internal RSA CA
          :raises CertificateError: error generating certificate
          :return: GatewayCertificate