Did you shoot RAW or JPEG?
The 40D and the 17-85 at 5.6 - 8 sharpness should not be too much of an issue and the shutter speed should be quick enough to stop shake, espcially if you had IS on.
If you look at picture 2 at the texture of the cloth in her dress, on her left shoulder it is pin sharp but the detail is not there in the eye lashes or more importantly her eyes.
In the first picture the eye detail is much sharper, her eyebrows are not so blonde and therefore emphasise her eyes better. (not your fault, natures)
Something i learned from an accomplished glamour photographer was always concentrate on focus on the eyes. He taught me to use the history brush tool in PS to boost sharpening for eyes, eyelashes, lips and eyebrows.
You have not got Image Editing On so i can't show you what i mean but both of these young ladies have beautiful eyes and this would really work for them i am sure.
I also think you are being a bit hard on yourself, what you have here are 2 lovely portraits and both look very natural and very well composed, i think you have used the rule of thirds to great effect with the poses / cropping.