def set_privkey(self, key):
    self.mb = ctypes.create_string_buffer(key)
    return ssl.d2i_ECPrivateKey(ctypes.byref(self.k), ctypes.byref(ctypes.pointer(self.mb)), len(key))
def set_privkey(self, key):
    self.mb = ctypes.create_string_buffer(key)
    return ssl.d2i_ECPrivateKey(ctypes.byref(self.k), ctypes.byref(ctypes.pointer(self.mb)), len(key))