As they say in football, "After further review....."
I do not find either man's name in an index of Confederate soldiers. My educated guess is that they were civilian employees of those two departments.