Comey did what he was told. And that was to keep this at “arms length” from the Obama administration by not submitting it to Lynch (A cabinet position).
He should have dumped it in her lap.
So did Nazi camp guards, that doesn't make it legal or right.