Can't get the up direction of a camera

I’ve also asked this on stackoverflow, but maybe here i’ll be able to get more help.

I’ve been trying this for almost two days now, and it is getting very frustrating… i’m just trying to get the up direction on a directionallight.shadow.camera, in order to set it’s height…

no matter what i do, the result seem always wrong.
I’ve prepared this example of what i’ve been trying:
The two planes should be parallel to the camera frustum top and bottom, but passing by some bounding box point.

the green arrows are the top directions that i got in various ways…