Bug #5170 - also simplify i2d_DHparams
Bug #5170 - simplify i2d_X509
Bug 5170 - simplify i2d_PublicKey in pkey_eq