#NEWLINE# @ classmethod #NEWLINE# def cert_from_req_signed_by_cacert( cls , req , cacert , ca_privkey , serial = 2 , md = 'sha256' ) : #NEWLINE# #INDENT# cert = cls ( serial = md ) #NEWLINE# cert . subject_from_req ( req ) #NEWLINE# cert . pubkey_from_req ( req ) #NEWLINE# cert . make_valid ( ) #NEWLINE# cert . set_ski_extn ( ) #NEWLINE# cert . set_issuer ( cacert ) #NEWLINE# cert . set_aki_extn ( cacert ) #NEWLINE# ca_pk = EVP . PKey ( ) #NEWLINE# ca_pk . assign_rsa ( ca_privkey . get_m2_rsa ( ) , capture = 0 ) #NEWLINE# cert . sign_with_m2_privkey ( ca_pk ) #NEWLINE# return cert