[openssl-users] Doubt about the CMS_sign() function (in file openssl/crypto/cms/cms_smime.c)
Hi folks, My name is Luiz Laranjeira. I am an associate professor of software engineering with the University of Brasilia, Brazil. I have a group that is developing a signer and validator according to RFC 5652 (CMS/PKCS#7) and we are using OpenSSL. I would like to ask your help concerning a doubt we have: Does the CMS_sign(...) function return a full CMS/PKCS#7 object coded in ASN1 according to RFC 5652 or does it return simply the digital signature field (encrypted hash of the data plus the signed attributes) in ASN1 format? I'd appreciate your assistance with this issue. Best regards, Luiz Laranjeira ___ openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: data size issue with SSL_read( ) / SSL_write
Hi does your server send \r\n with hello? i read byte by byte until i found an \r\n Regards Luiz Hello, In my programm, client send HELLO message to server. 1) --- SSL_write is encapsulated in MY_send( ) function like this : MY_send(MY_cn sd, const char* data, size_t len) { ret = SSL_write(socki-ssl, data, len); } and MY_send is encapsuled in MYsend like this : int MYApi::MYsend(SIP_cn sd, const std::string data) { return MY_send(sd, data.data(), data.size()); } in python code, I call : api.MYsend(sock, HELLO) 2) --- SSL_read is encapsulated in MY_recv( ) function like this : MY_recv(MY_cn sd, char* buf, size_t* len, unsigned int flags, unsigned int timeout) { SSL_read(socki-ssl, buf, *len); } and MY_recv is encapsuled in MYrecv like this : int MYApi::MYrecv(MY_cn sd, const std::string data) { strresult *r = new strresult; const size_t L=8*1024; size_t len = L; char buf[L]; r-first = MY_recv(sd, buf, len, flags, timeout); if (!r-first) r-second.assign(buf, len); return r; } in python code, I call err,data = api.MYrecv(cn, 0, 0) The problem : when I print data, I have got : HELLO��y0�y 0�y��y i`�0�y ������L���L��-M etc... instead of HELLO. in MYrecv, when I make L = 5, it works what should I do to read just the right size so that when I print I get HELLO, GOODBYE, etc ... and not HELLO��y0�y, GOODBYE��y0�y etc ... thanks for your help __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Does OpenSSL supports the HTTP POST request?
Hi I use https post with any problem you just need to format properly your https post string , and send the data Regards Luiz Hi, I want to use HTTP POST request for connecting to the server..I checked with the available sample programs but it all supports HTTP GET. So my doubt is that Is it possible to send HTTP POST message using the openSSL. If yes?then how I can achieve that? Thanks. -- View this message in context: http://old.nabble.com/Does-OpenSSL-supports-the-HTTP-POST-request--tp28754933p28754933.html Sent from the OpenSSL - User mailing list archive at Nabble.com. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: [FWD] SSL_write returned SSL_ERROR_SSL
Hi I use to write data to openssl the follow function int hb_inetSSLWrite(int com,SSL* pSSL, int timeout, char * msg, int length, int* iRet) { int ret; int sslerr; int r; fd_set fd_r, fd_w; struct timeval tv; do { ret = SSL_write(pSSL, msg, length); sslerr = SSL_get_error(pSSL, ret); if ( ret 0) { r = 1; *iRet = 0; break; } *iRet = sslerr; FD_ZERO( fd_r ); FD_ZERO( fd_w ); if( timeout 0 ) { tv.tv_sec = timeout / 1000; tv.tv_usec = ( timeout % 1000 ) * 1000; } switch (sslerr) { case SSL_ERROR_WANT_READ: FD_SET(com,fd_r); break; case SSL_ERROR_WANT_WRITE: FD_SET(com,fd_w); break; default: return -1; } if( timeout 0 ) r = select(com+1,fd_r,fd_w,NULL,tv); else r = select(com+1,fd_r,fd_w,NULL,NULL); } while ( ret == -1 r != 0 ); if ( r == 0) return -1; return ret; } Regards Luiz Forwarding to openssl-users for public discussion. Best regards, Lutz - Forwarded message from sandeep.kuma...@wipro.com - Subject: SSL_write returned SSL_ERROR_SSL Date: Tue, 3 Nov 2009 19:25:03 +0530 Thread-Topic: SSL_write returned SSL_ERROR_SSL Thread-Index: AcpcjT4Rk9sPCTZ0QEaWqLVTn71DBQ== From: sandeep.kuma...@wipro.com To: r...@openssl.org I am facing some weird problem in SSL_write(). Most of the times it returned with SSL_ERROR_SSL. Can anyone explain what is this error and how can we fix this. I am using 0.9.8g openssl version. Any assistance (including temporary workarounds) appreciated. Thanks Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - End forwarded message - -- Lutz Jaenicke jaeni...@openssl.org OpenSSL Project http://www.openssl.org/~jaenicke/ __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
SSL_read/SSL_write and select
Dear Friends How to use properly SSL_read/SSL_write with select? my default code with use standart api, make an call to select before call to recv/send api my code to read is like this to Read i use do { if( iPos == iAllocated - 1 ) { iAllocated += iBufferSize; Buffer = ( char * ) hb_xrealloc( Buffer, iAllocated ); } if( hb_selectReadSocket( Socket ) ) { iLen = SSL_read( Socket-pSSL, cChar, 1 ); iRet = SSL_get_error( Socket-pSSL, iLen) ; Socket-errorCode = iRet; } else { iTimeElapsed += Socket-timeout; /* this signals timeout */ iLen = -2; } if( iLen 0 ) { /* verify endsequence recognition automata status */ if( cChar == szPattern[ ulPatPos ] ) { ulPatPos ++; if( ! szPattern[ ulPatPos ] ) { break; } } else { ulPatPos = 0; } Buffer[ iPos++ ] = cChar; } else { break; } } while( iMax == 0 || iPos iMax ); static int hb_selectReadSocket( HB_SSL_SOCKET_STRUCT *Socket ) { fd_set set; struct timeval tv; FD_ZERO( set ); FD_SET(Socket-com, set); if( Socket-timeout == -1 ) { if( select( Socket-com + 1, set, NULL, NULL, NULL ) 0 ) return 0; } else { tv.tv_sec = Socket-timeout/ 1000; tv.tv_usec = (Socket-timeout % 1000) * 1000; if( select( Socket-com + 1, set, NULL, NULL, tv ) 0 ) return 0; } return FD_ISSET( Socket-com, set ); } So , how can i change so can work correctly with openssl SSL_read/SSL_write api Thanks in advance Regards Luiz Rafael __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Pop3/smtp with gmail
Dear Friends Does any one has an small sample on using openssl in C to connect to gmail pop3 and smtp server. with my code , i can connect with out problems on the server, but when i send PASS command for pop, i get the -Err unsuported command , same response i get for sending AUTH LOGIN to smtp server Also i use select() to poll read and write mode. and some times both SSL_read and SSL_write return 0 with errorcode 5 Regards Luiz __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
what is the best way to read write data on openssl
Dear Friends My current code that use standart sockets connect and receive data correctly using an call to select () and depending on it return value to recv/send api what is the best way to do the same using SSL_read/SSL_write api? openssl 0.98k under msvc and borland ++, and linux with gcc Regards Luiz __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Pop3/smtp with gmail
Dear Friends Does any one has an small sample on using openssl in C to connect to gmail pop3 and smtp server. with my code , i can connect with out problems on the server, but when i send PASS command for pop, i get the -Err unsuported command , same response i get for sending AUTH LOGIN to smtp server Regards Luiz __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Plataforms
Does anybody knows if exists any implementation of openSSL on the following plataforms:SymbianBrewWindows CEJava MEIf it exists, can you send me it or say to me where i can get?Thanks!
Installation problem
Missing file wincrypt.h when compiling version 0.9.6a and 0.9.6b using VC on file .\crypto\rand\rand_win.c Any help? Luiz Filipe __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
Books on OPENSSL and Certificates
Hi, I want to know if someone knows a good book, where I can find information about how to use openssl. Thanks, Luiz Carneiro __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
How I can generate certificates to use with IIS 4.0
Hi... How can I use openssl to generate certificates to use with IIS 4.0? Thanks, Luiz Carneiro __ OpenSSL Project http://www.openssl.org User Support Mailing List[EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]