code: func (ssa *SQLStorageAuthority) GetCertificateStatus(ctx context.Context, serial string) (core.CertificateStatus, error) {
  	if !core.ValidSerial(serial) {
  		err := fmt.Errorf("Invalid certificate serial %s", serial)
  		return core.CertificateStatus{}, err
  	}
  
  	var status core.CertificateStatus
  	statusObj, err := ssa.dbMap.WithContext(ctx).Get(certStatusModel{}, serial)
  	if err != nil {
  		return status, err
  	}
  	if statusObj == nil {
  		return status, nil
  	}
  	statusModel := statusObj.(*certStatusModel)
  	status = core.CertificateStatus{
  		Serial:                statusModel.Serial,
  		Status:                statusModel.Status,
  		OCSPLastUpdated:       statusModel.OCSPLastUpdated,
  		RevokedDate:           statusModel.RevokedDate,
  		RevokedReason:         statusModel.RevokedReason,
  		LastExpirationNagSent: statusModel.LastExpirationNagSent,
  		OCSPResponse:          statusModel.OCSPResponse,
  		NotAfter:              statusModel.NotAfter,
  		IsExpired:             statusModel.IsExpired,
  	}
  
  	return status, nil
  }
docs: // GetCertificateStatus takes a hexadecimal string representing the full 128-bit serial
  // number of a certificate and returns data about that certificate's current
  // validity.