When Nazi Germany did the Holocaust, did they pass laws that made what they did legal (e.g. allowing the summary execution of civilians), or did they break their own laws?
While more might always be said, u/commiespaceinvader has written extensively on the nature of legality in the Third Reich, including more generally here, and as it pertains to specific killings during the Holocaust here.