But the Lord was with Joseph and showed kindness to him and enabled him to win the favor of the keeper of the prison,