This routine will initialize a Security Manager context correctly for use in subsequent function calls.