putDERInt :: Integer -> Put
putDERInt int = do
  let intBS = unroll BE int
      headByte = BS.head intBS
  if headByte .&. 0x80 == 0x80
    then Put.putByteString $ 0x00 `BS.cons` intBS
    else Put.putByteString intBS
putDERInt :: Integer -> Put
putDERInt int = do
  let intBS = unroll BE int
      headByte = BS.head intBS
  if headByte .&. 0x80 == 0x80
    then Put.putByteString $ 0x00 `BS.cons` intBS
    else Put.putByteString intBS
putDERInt int = do
  let intBS = unroll BE int
      headByte = BS.head intBS
  if headByte .&. 0x80 == 0x80
    then Put.putByteString $ 0x00 `BS.cons` intBS
    else Put.putByteString intBS