parameters: (
          CN, CACert, CAkey, snum, START, END, C='CA', ST='Ontario', L='Toronto',
          O=VPN_ORG, OU='Clients', emailAddress='pwouters@redhat.com',
          ty=crypto.TYPE_RSA, keybits=2048, sign_alg='sha256', isCA=False)
return_statement: return cert, certkey
docstring: Create a subordinate cert and return the cert, key tuple
      This could be a CA for an intermediate, or not for an EE
docstring_summary: Create a subordinate cert and return the cert, key tuple
      This could be a CA for an intermediate, or not for an EE
docstring_tokens: Create a subordinate cert and return the cert key tuple This could be a CA for an intermediate or not for an EE
function: def create_sub_cert(
          CN, CACert, CAkey, snum, START, END, C='CA', ST='Ontario', L='Toronto',
          O=VPN_ORG, OU='Clients', emailAddress='pwouters@redhat.com',
          ty=crypto.TYPE_RSA, keybits=2048, sign_alg='sha256', isCA=False):
      """ Create a subordinate cert and return the cert, key tuple
      This could be a CA for an intermediate, or not for an EE
      """
      # pylint: disable=invalid-name, too-many-arguments, too-many-locals
      certkey = create_keypair(ty, keybits)
      certreq = create_csr(certkey, CN, C, ST, L, O, OU, emailAddress, sign_alg)
      cert = crypto.X509()
      cert.set_serial_number(snum)
      cert.set_notBefore(START.encode('utf-8'))
      cert.set_notAfter(END.encode('utf-8'))
      cert.set_issuer(CACert.get_subject())
      cert.set_subject(certreq.get_subject())
      cert.set_pubkey(certreq.get_pubkey())
      cert.set_version(2)
      set_cert_extensions(cert, isCA)
      cert.sign(CAkey, sign_alg)
      return cert, certkey
function_tokens: def create_sub_cert ( CN , CACert , CAkey , snum , START , END , C = 'CA' , ST = 'Ontario' , L = 'Toronto' , O = VPN_ORG , OU = 'Clients' , emailAddress = 'pwouters@redhat.com' , ty = crypto . TYPE_RSA , keybits = 2048 , sign_alg = 'sha256' , isCA = False ) : # pylint: disable=invalid-name, too-many-arguments, too-many-locals certkey = create_keypair ( ty , keybits ) certreq = create_csr ( certkey , CN , C , ST , L , O , OU , emailAddress , sign_alg ) cert = crypto . X509 ( ) cert . set_serial_number ( snum ) cert . set_notBefore ( START . encode ( 'utf-8' ) ) cert . set_notAfter ( END . encode ( 'utf-8' ) ) cert . set_issuer ( CACert . get_subject ( ) ) cert . set_subject ( certreq . get_subject ( ) ) cert . set_pubkey ( certreq . get_pubkey ( ) ) cert . set_version ( 2 ) set_cert_extensions ( cert , isCA ) cert . sign ( CAkey , sign_alg ) return cert , certkey