  We derive explicit Krein resolvent identities for generally singular
Sturm-Liouville operators in terms of boundary condition bases and the Lagrange
bracket. As an application of the resolvent identities obtained, we compute the
trace of the resolvent difference of a pair of self-adjoint realizations of the
Bessel expression $-d^2/dx^2+(\nu^2-(1/4))x^{-2}$ on $(0,\infty)$ for values of
the parameter $\nu\in[0,1)$ and use the resulting trace formula to explicitly
determine the spectral shift function for the pair.
