def get_privkey(self):
    size = ssl.i2d_ECPrivateKey(self.k, 0)
    mb_pri = ctypes.create_string_buffer(size)
    ssl.i2d_ECPrivateKey(self.k, ctypes.byref(ctypes.pointer(mb_pri)))
    return mb_pri.raw
def get_privkey(self):
    size = ssl.i2d_ECPrivateKey(self.k, 0)
    mb_pri = ctypes.create_string_buffer(size)
    ssl.i2d_ECPrivateKey(self.k, ctypes.byref(ctypes.pointer(mb_pri)))
    return mb_pri.raw