- def shortname(self):
- " Returns short name if any "
- return libcrypto.OBJ_nid2sn(self.nid)
- def longname(self):
- " Returns logn name if any "
- return libcrypto.OBJ_nid2ln(self.nid)
+ if pyver == 2:
+ def shortname(self):
+ " Returns short name if any "
+ return libcrypto.OBJ_nid2sn(self.nid)
+ def longname(self):
+ " Returns long name if any "
+ return libcrypto.OBJ_nid2ln(self.nid)
+ else:
+ def shortname(self):
+ " Returns short name if any "
+ return libcrypto.OBJ_nid2sn(self.nid).decode('utf-8')
+ def longname(self):
+ " Returns long name if any "
+ return libcrypto.OBJ_nid2ln(self.nid).decode('utf-8')
+