According to Wikipedia.
Bonhoeffer was condemned to death on April 8, 1945, by SS judge Otto Thorbeck at a drumhead court-martial without witnesses,
(I forgot to copy the link before I closed the tab, you can find it by googling his name )
The July 20th plotters were tried by "People's Courts". They were no more like our idea of a "fair trial" than one of Stalin's show trials, but they were in accordance with contemporary German law.