Sudarshana KS wrote: > Hi, > > Currently i have data with the following type - Which is a x509 > certificate obtained from SSL server done. I need this to be converted > to normal string, so that i can use the load_certificate method of > OpenSSL, which takes string as the argument.
The below data is a string. It contains lots of non-ascii values which are printed as \x escapes, but it is still a string. Have you tried passing it to load_certificate? What happened? Kent > > Kindly help me. > > > cert= > '\x00\x01\xa20\x82\x01\x9e0\x82\x01(\x02\x01\x000\r\x06\t*\x86H\x86\xf7\r\x01\x01\x04\x05\x000:1 > \x120\x10\x06\x03U\x04\x03\x13\tConst2-2.1$0\n\x06\x03U\x04\x05\x13\x0339B0\x16\x06\t*\x86H\x86\xf7\r > > > \x01\t\x02\x16\tConst2-2.0\x1e\x17\r070207210438Z\x17\r170204210438Z0:1\x120\x10\x06\x03U\x04\x03 > \x13\tConst2-2.1$0\n\x06\x03U\x04\x05\x13\x0339B0\x16\x06\t*\x86H\x86\xf7\r\x01\t\x02\x16\tConst2-2.0|0\r > \x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03k\x000h\x02a\x00\xc2\x99e2\xd0\xa5\xb67\x80iv.\x12I\x17 > > > \xaa\xee9S\xdc\xee\xa1!\xb4\x94/\xf8\xe2\x0e%V\xdc\xa8%\x04\x03\x8dl\\\x8cJ\xec\x13\xd7\xe2\x96\x1b\xa8` > \xdf$\xfe\xb9\x9a\xf9\xb7[\x8f\xe6\xc7U?&l\x04D\xfc\xd7\x96\x99\x04\xb1\x8c\xcd\xc3[\x17\xba\xb2+g5L > \x08~3B\xf9\x1dV\x1a\x84\x0eW\x94\x1f\x02\x03\x01\x00\x010\r\x06\t*\x86H\x86\xf7\r\x01\x01\x04\x05 > > > [EMAIL PROTECTED]<\xae\xc7\xf6l\xeam2\x8f[Z\xde\xd0\xbf\xd7\xd1/ > [EMAIL PROTECTED] > \x88\xce|v\xb2\xc35#\xc5\xa7\xec\xdca\x12\xd8*\xc3k\xf8\x911}!\x861\xe2;\xd7' > > > > -- > Regards, > Sudarshana K S > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor