In message <[EMAIL PROTECTED]> on Sat, 28 Feb 2004 22:50:57 -0800 (PST), "S.Mehdi Sheikhalishahi" <[EMAIL PROTECTED]> said:
sm_justice> Hi Group sm_justice> I want to use sk_pop to retreive the last item in sm_justice> stack I want to know that the what's the length of the sm_justice> returned char*.For example What's the length of buf? sm_justice> in the following code. sm_justice> sm_justice> for(int i = 0;i < sk_num(skCerts);i++) { sm_justice> buf = sk_pop(skCerts); sm_justice> //? What's the length of buf? sm_justice> certt.loadFromBuffer((byte*)buf,(int) sm_justice> strlen(buf)); sm_justice> CACerts.push_back(certt); sm_justice> } sm_justice> Thanks. The size of the thing you pop from the stack is whatever it was when you put it in. If the popped object is a char*, it's very likely strlen() is the way to get the length. If it's a different object, there are probably other ways to figure out the size. However, with the little information you give us, we can't tell you. What exactly was placed in skCerts? The fact that sk_pop() returns a char* is irrelevant. It's used as a generic type, and should be cast to whatever the real type is. ----- Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte \ Tunnlandsvägen 52 \ [EMAIL PROTECTED] [EMAIL PROTECTED] \ S-168 36 BROMMA \ T: +46-708-26 53 44 \ SWEDEN \ Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]