  Using a recently introduced representation of the second order adjoint state
as the solution of a function-valued backward stochastic partial differential
equation (SPDE), we calculate the viscosity super- and subdifferential of the
value function evaluated along an optimal trajectory for controlled semilinear
SPDEs. This establishes the well-known connection between Pontryagin's maximum
principle and dynamic programming within the framework of viscosity solutions.
As a corollary, we derive that the correction term in the stochastic
Hamiltonian arising in non-smooth stochastic control problems is non-positive.
These results directly lead us to a stochastic verification theorem for fully
nonlinear Hamilton--Jacobi--Bellman equations in the framework of viscosity
solutions.
