He doesn't need to have two hands on it but be considered to "have control of the ball".
A goalkeeper is considered to be in control of the ball when:
the ball is between the hands or between the hand and any surface (e.g. ground, own body) or by touching it with any part of the hands or arms...