DBObject query = getDBObjectForSignerId(signerId);
DBCollection signerInfoCollection = getSignerInfoCollection();
DBObject signerInfoDBObject = signerInfoCollection.findOne(query);
// Sub-class contract specifies return null when not found
SignerInfo signerInfo = null;
if (signerInfoDBObject != null) {
byte[] protobuff = (byte[]) signerInfoDBObject.get("protoBuff");
try {
signerInfo = new SignerInfo(ProtocolSignerInfo.parseFrom(protobuff));
} catch (InvalidProtocolBufferException e) {
LOG.log(Level.SEVERE, "Couldn't parse the protobuff stored in MongoDB: " + protobuff, e);
} catch (SignatureException e) {
LOG.log(Level.SEVERE, "Couldn't parse the certificate chain or domain properly", e);
}