erdtlsenc: Don't force typecast on callbacks

Use the correct prototypes instead, and cast where required.