<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def serial(self):
 """ Serial number of certificate as integer """

        asnint = libcrypto.X509_get_serialNumber(self.cert)
        bio = Membio()
        libcrypto.i2a_ASN1_INTEGER(bio.bio, asnint)
        return int(str(bio), 16)