Both men vowed to go after Osama bin Laden until he is brought to justice. That is what Bush said as well, although many of the assets that were needed to do that were moved to Iraq. McCain and Obama say Afghanistan will once again be a primary focus.
President Bush has only recently allowed dialogue with Iran, which will likely continue with McCain or Obama. But the two men differ on whom they would talk to.
McCain does not support direct talks with Iranian leadership without pre-conditions, saying on "Fox News Sunday," "The question is, are you going to have direct talks, and does that enhance the prestige of the president of Iran, who said all these things about us, and has announced his country's continued distinction to the extinction of the state of Israel, or does it reach a successful conclusion? That's the question you have to ask when you talk about face-to-face talks."
Obama supports talks with Iranian leaders, saying that he believes in a carrot-and-stick approach and that he would move forward aggressively with dialogue and diplomacy while still supporting sanctions.
Neither of the men has ruled out military action as a last option if diplomacy fails or the threat of nuclear weapons is imminent.
Both McCain and Obama support continued diplomatic efforts with North Korea, but McCain opposed removing North Korea from the list of state sponsors of terrorism. Obama supported it.
McCain also rules out talks with North Korean leaders without preconditions. Obama, as he does in Iran, supports it saying, "This notion by not talking to people we are punishing them has not worked. It has not worked in Iran. It has not worked in North Korea. In each instance, our efforts of isolation have actually accelerated their efforts to get nuclear weapons."
Whatever foreign policy the candidates are articulating now, it is almost certain to change because of events and the natural evolution of ideas.
Candidate George Bush espoused quite a different view of the world than he has as president. For Bush, it was 9/11 that necessarily changed his worldview.
For Obama and McCain, there is bound to be an unforeseen event that will change their views as well.