Considering where and when it did occur, whether or not it was performed by Lincoln or the Congress, the court ruled it illegal.
Had there been such a thing as a confederate supreme court I wonder what they would have thought of the Davis suspension of habeas corpus. If they followed the same legal thinking of the U.S. Supreme court I would assume that they should have found Davis in violation of the constitution as well. But we'll never know.