We perform a detailed study of the weak interactions of standard model
neutrinos with the primordial plasma and their effect on the resonant
production of sterile neutrino dark matter. Motivated by issues in cosmological
structure formation on small scales, and reported X-ray signals that could be
due to sterile neutrino decay, we consider $7$ keV-scale sterile neutrinos.
Oscillation-driven production of such sterile neutrinos occurs at temperatures
$T \gtrsim 100$ MeV, where we study two significant effects of weakly charged
species in the primordial plasma: (1) the redistribution of an input lepton
asymmetry; (2) the opacity for active neutrinos. We calculate the
redistribution analytically above and below the quark-hadron transition, and
match with lattice QCD calculations through the transition. We estimate
opacities due to tree level processes involving leptons and quarks above the
quark-hadron transition, and the most important mesons below the transition. We
report final sterile neutrino dark matter phase space densities that are
significantly influenced by these effects, and yet relatively robust to
remaining uncertainties in the nature of the quark-hadron transition. We also
provide transfer functions for cosmological density fluctuations with cutoffs
at $k \simeq 10 \ h \ {\rm Mpc}^{-1}$, that are relevant to galactic structure
formation.