Pass certificate validity length into the constructor.