  Context. The observation of >100 MeV {\gamma}-rays in the minutes to hours
following solar flares suggests that high-energy particles interacting in the
solar atmosphere can be stored and/or accelerated for long time periods. The
occasions when {\gamma}-rays are detected even when the solar eruptions
occurred beyond the solar limb as viewed from Earth provide favorable viewing
conditions for studying the role of coronal shocks driven by coronal mass
ejections (CMEs) in the acceleration of these particles.
  Aims: In this paper, we investigate the spatial and temporal evolution of the
coronal shocks inferred from stereoscopic observations of behind-the-limb
flares to determine if they could be the source of the particles producing the
{\gamma}-rays.
  Methods: We analyzed the CMEs and early formation of coronal shocks
associated with {\gamma}-ray events measured by the Fermi-Large Area Telescope
(LAT) from three eruptions behind the solar limb as viewed from Earth on 2013
Oct. 11, 2014 Jan. 06 and Sep. 01. We used a 3D triangulation technique, based
on remote-sensing observations to model the expansion of the CME shocks from
above the solar surface to the upper corona. Coupling the expansion model to
various models of the coronal magnetic field allowed us to derive the
time-dependent distribution of shock Mach numbers and the magnetic connection
of particles produced by the shock to the solar surface visible from Earth.
  Results: The reconstructed shock fronts for the three events became
magnetically connected to the visible solar surface after the start of the
flare and just before the onset of the >100 MeV {\gamma}-ray emission. The
shock surface at these connections also exhibited supercritical Mach numbers
required for significant particle energization.
  [...] (Abridged)
