Add an API to get the fd used by the kms