support send of messages for secure connection in python 2.6

python2.6/ssl.py module does not support bytearray messages and
throughs the below exception
TypeError: write() argument 1 must be string or read-only buffer, not
bytearray*