Discussion:
Building problems with Embedded VC++
Kambourakis Georgios
2003-09-29 13:49:57 UTC
Permalink
Hi,
Thanks Steven.

I have installed succesfully OpensSSL 0.7.7b for Win CE and
i am trying to build a client app. for pocket PC 2002 (embedded VC++ 3.0)
and i get the following errors:

C:\mob\Mob_project\mob_client\common.h(13): Could not find the file pthread.h.
C:\mob\openssl-0.9.7b\inc32\openssl\kssl.h(72): Could not find the file krb5.h.
C:\mob\Mob_project\mob_client\reentrant.h(5): Could not find the file unistd.h.
Linking...
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_cipher_list referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_ctrl referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_verify referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb_userdata referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_chain_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_load_verify_locations referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSLv23_method referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_write referenced in function do_client_loop
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_clear referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_shutdown referenced in function main
client3.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function main
common.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function post_connection_check
client3.obj : error LNK2019: unresolved external symbol SSL_connect referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_set_bio referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_new referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_ctrl referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_new_connect referenced in function main
common.obj : error LNK2019: unresolved external symbol ERR_print_errors_fp referenced in function handle_error
common.obj : error LNK2019: unresolved external symbol SSL_library_init referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol THREAD_setup referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_NAME_oneline referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_get_issuer_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error_depth referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_current_cert referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol SSL_get_verify_result referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_free referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol stricmp referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_NAME_get_text_by_NID referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_value referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_num referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol ASN1_item_d2i referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509V3_EXT_get referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_nid2sn referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_obj2nid referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_EXTENSION_get_object referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext_count referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function post_connection_check
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup
ARMDbg/mob_client.exe : fatal error LNK1120: 44 unresolved externals
Error executing link.exe.

Any advices ??

Many thanks in advance
Steven Reddie
2003-09-29 14:16:18 UTC
Permalink
Hi, the pthread.h and unistd.h headers included by your project aren't
available under Windows CE. The unresolved symbols would appear to indicate
that you haven't included the built OpenSSL libraries when linking your
application. The WinMainCRTStartup unresolved symbol means that you haven't
defined an entry point (WinMain) in your application (Note that Windows CE
doesn't use main as an entry point, although you can always write a WinMain
that calls main).

Regards,

Steven

-----Original Message-----
From: owner-openssl-users-MCmKBN63+***@public.gmane.org
[mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] On Behalf Of Kambourakis Georgios
Sent: Monday, 29 September 2003 11:50 PM
To: openssl-users-MCmKBN63+***@public.gmane.org
Subject: Building problems with Embedded VC++


Hi,
Thanks Steven.

I have installed succesfully OpensSSL 0.7.7b for Win CE and
i am trying to build a client app. for pocket PC 2002 (embedded VC++ 3.0)
and i get the following errors:

C:\mob\Mob_project\mob_client\common.h(13): Could not find the file
pthread.h.
C:\mob\openssl-0.9.7b\inc32\openssl\kssl.h(72): Could not find the file
krb5.h.
C:\mob\Mob_project\mob_client\reentrant.h(5): Could not find the file
unistd.h.
Linking...
client3.obj : error LNK2019: unresolved external symbol
SSL_CTX_set_cipher_list referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_ctrl
referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_verify
referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol
SSL_CTX_use_PrivateKey_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol
SSL_CTX_set_default_passwd_cb_userdata referenced in function
setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol
SSL_CTX_use_certificate_chain_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol
SSL_CTX_load_verify_locations referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_new
referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSLv23_method
referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_write referenced
in function do_client_loop
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_free
referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_free referenced
in function main
client3.obj : error LNK2019: unresolved external symbol SSL_clear referenced
in function main
client3.obj : error LNK2019: unresolved external symbol SSL_shutdown
referenced in function main
client3.obj : error LNK2019: unresolved external symbol
X509_verify_cert_error_string referenced in function main
common.obj : error LNK2019: unresolved external symbol
X509_verify_cert_error_string referenced in function post_connection_check
client3.obj : error LNK2019: unresolved external symbol SSL_connect
referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_set_bio
referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_new referenced
in function main
client3.obj : error LNK2019: unresolved external symbol BIO_ctrl referenced
in function main
client3.obj : error LNK2019: unresolved external symbol BIO_new_connect
referenced in function main
common.obj : error LNK2019: unresolved external symbol ERR_print_errors_fp
referenced in function handle_error
common.obj : error LNK2019: unresolved external symbol SSL_library_init
referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol THREAD_setup
referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol X509_get_subject_name
referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_NAME_oneline
referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_get_issuer_name
referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol
X509_STORE_CTX_get_error referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol
X509_STORE_CTX_get_error_depth referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol
X509_STORE_CTX_get_current_cert referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol SSL_get_verify_result
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_free referenced
in function post_connection_check
common.obj : error LNK2019: unresolved external symbol stricmp referenced in
function post_connection_check
common.obj : error LNK2019: unresolved external symbol
X509_NAME_get_text_by_NID referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_value referenced
in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_num referenced in
function post_connection_check
common.obj : error LNK2019: unresolved external symbol ASN1_item_d2i
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509V3_EXT_get
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_nid2sn referenced
in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_obj2nid
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol
X509_EXTENSION_get_object referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext_count
referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol
SSL_get_peer_certificate referenced in function post_connection_check
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol
WinMain referenced in function WinMainCRTStartup
ARMDbg/mob_client.exe : fatal error LNK1120: 44 unresolved externals
Error executing link.exe.

Any advices ??

Many thanks in advance
Thomas Monjalon
2003-09-29 16:23:10 UTC
Permalink
Hello,

What does OpenSSL lacks to be S/MIME v3 compatible ?
Is PKCS#7 implementation not compatible with S/MIME v3 ?

Thanks.

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Dr. Stephen Henson
2003-09-29 16:30:26 UTC
Permalink
Post by Thomas Monjalon
Hello,
What does OpenSSL lacks to be S/MIME v3 compatible ?
Quite a lot...

It needs a major rewrite, probably a completely new CMS section to handle this
anything like properly. I'd really like it to support streaming ASN1 too.

Its planned but I've not received much interest so far. Anyone interested
should let me know.
Post by Thomas Monjalon
Is PKCS#7 implementation not compatible with S/MIME v3 ?
Many S/MIME clients use v2 or only produce v2 compatible messages.

OpenSSLs S/MIME is compatible in the sense that PKCS#7 messages are almost
always readable by S/MIME v3 (you have to do some low level stuff to create
something incompatible).

Equally many S/MIME v3 messages can be handled by OpenSSL S/MIME its just a
few of the more complex cases it can't deal with.

Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: shenson-Pqzf/mBTa20vnmoEvQhlZgbYiX8G1TQY9dF7HbQ/***@public.gmane.org, PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Thomas Monjalon
2003-10-17 10:05:40 UTC
Permalink
Hello,

I am using RSA_public_encrypt(...) with always the same key and the same
data to encrypt.
Each time it generate different encrypted data.

I would like to know why the results is each time different.
Is there a random stuff ? Is it to make encryption more secure ?

Thanks.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Joshua Juran
2003-10-17 10:31:24 UTC
Permalink
--On Friday, October 17, 2003 12:05 PM +0200 Thomas Monjalon
Post by Thomas Monjalon
Hello,
I am using RSA_public_encrypt(...) with always the same key and the same
data to encrypt.
Each time it generate different encrypted data.
I would like to know why the results is each time different.
Is there a random stuff ? Is it to make encryption more secure ?
Yes, and no. Because asymmetric encryption (i.e. public-key, e.g. RSA) is
considerably slower than symmetric encryption (conventional, private-key,
e.g. AES), a symmetric key is randomly generated and used to encrypt the
plaintext. That key is then encrypted with the RSA public key. Is it more
secure than RSA-encrypting the whole file? Unlikely, since RSA (which is
thought to be the weakest link in the chain) is still used, but it's a good
deal faster, which is the point.

I just read the PGP FAQ, so I think I know what I'm talking about, but I'm
sure someone will correct me if I don't.

Josh
--
Joshua Juran
Metamage Software Creations - Mac Software and Consulting
http://www.metamage.com/

* Creation at the highest state of the art *


______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Thomas Monjalon
2003-10-17 11:47:11 UTC
Permalink
Hello,
Post by Joshua Juran
--On Friday, October 17, 2003 12:05 PM +0200 Thomas Monjalon
Post by Thomas Monjalon
Hello,
I am using RSA_public_encrypt(...) with always the same key and the same
data to encrypt.
Each time it generate different encrypted data.
I would like to know why the results is each time different.
Is there a random stuff ? Is it to make encryption more secure ?
Yes, and no. Because asymmetric encryption (i.e. public-key, e.g. RSA) is
considerably slower than symmetric encryption (conventional, private-key,
e.g. AES), a symmetric key is randomly generated and used to encrypt the
plaintext. That key is then encrypted with the RSA public key. Is it more
secure than RSA-encrypting the whole file? Unlikely, since RSA (which is
thought to be the weakest link in the chain) is still used, but it's a good
deal faster, which is the point.
I am not sure it is the right explaination : I think that I don't
generate a symetric key.
In fact, it would be true if I used the EVP interface. But I use the
"low-level" function which directly encrypt (RSA_public_encrypt).

So, my question was :
Why the encrypted data seem random ?
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
David Schwartz
2003-10-20 00:06:29 UTC
Permalink
Post by Thomas Monjalon
I am not sure it is the right explaination : I think that I don't
generate a symetric key.
In fact, it would be true if I used the EVP interface. But I use the
"low-level" function which directly encrypt (RSA_public_encrypt).
Why the encrypted data seem random ?
If it didn't, it wouldn't be secure. Imagine if you have a scheme where one
person says encrypted replies to the other. Sometimes the reply is 'yes' and
sometimes it's 'no'. Imagine also that an attacker can tell whether it was
'yes' or 'no' the next day, maybe the question is 'should we attack today?'.
If every 'no' encrypted to the same thing, the attacker would just have to
wait for the reply to change, and then he'd know that he was going to be
attacked today. That wouldn't be very secure.

DS


______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
jna
2003-10-20 01:18:10 UTC
Permalink
I am getting the following:

[Sun Oct 19 03:02:36 2003] [crit] (98)Address already in use: make_sock:
could not bind to port 443

When I try starting my apache ssl server. I am using open ssl and mod_ssl.

I have one address only that is using ssl and the rest of my sites are
using normal web port (80). I have an example shortened here below:

NameVirtualHost 12.96.249.122:80

<virtualhost 12.96.249.122:80>
#This is the non ssl address
ServerAdmin sales-oLzLWzLNodOsTnJN9+***@public.gmane.org
DocumentRoot /usr/web/tcpbbs.net
ServerName www.tcpbbs.net
ServerPath /tcpbbs.net
ServerAlias tcpbbs.net
ErrorLog /usr/web/logs/tcp_error.log
TransferLog /usr/web/logs/tcp_access.log
</VirtualHost>

<VirtualHost 12.96.249.122:443>
DocumentRoot "/usr/web/webroot"
ServerName unix.tcpbbs.net
ServerAdmin root-***@public.gmane.org
ErrorLog /usr/web/logs/unix-error_log
TransferLog /usr/web/logs/unix-access_log
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/conf/ssl.crt/public.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/myserver.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog /usr/local/apache/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>


Again the above shows one non ssl and one ssl host, in actuallity there are
12 non ssl hosts and 1 ssl host but for simplicity there was no reason to
post all 12 non ssl virtual host section.

Any idea why I am getting that error and how to rid the server of it so it
will work!?

Many thanks,
John

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Richard Levitte - VMS Whacker
2003-10-20 04:55:50 UTC
Permalink
You're asking a mod_ssl-specific question on openssl-users? I'm
sorry, that's not quite the right list, you should try
modssl-users-PtrqzZoGfuUdnm+***@public.gmane.org

An idea though: are you sure there is no other daemon hooked on port
443? Tools like 'netstat -an' and 'lsof' may be of help here, at
least if that's on a Unix system.

In message <019a01c396a8$0726a0b0$***@BASEMENT> on Sun, 19 Oct 2003 20:18:10 -0500, jna <jna-oLzLWzLNodOsTnJN9+***@public.gmane.org> said:

jna>
jna> I am getting the following:
jna>
jna> [Sun Oct 19 03:02:36 2003] [crit] (98)Address already in use: make_sock:
jna> could not bind to port 443
jna>
jna> When I try starting my apache ssl server. I am using open ssl and mod_ssl.
jna>
jna> I have one address only that is using ssl and the rest of my sites are
jna> using normal web port (80). I have an example shortened here below:
jna>
jna> NameVirtualHost 12.96.249.122:80
jna>
jna> <virtualhost 12.96.249.122:80>
jna> #This is the non ssl address
jna> ServerAdmin sales-oLzLWzLNodOsTnJN9+***@public.gmane.org
jna> DocumentRoot /usr/web/tcpbbs.net
jna> ServerName www.tcpbbs.net
jna> ServerPath /tcpbbs.net
jna> ServerAlias tcpbbs.net
jna> ErrorLog /usr/web/logs/tcp_error.log
jna> TransferLog /usr/web/logs/tcp_access.log
jna> </VirtualHost>
jna>
jna> <VirtualHost 12.96.249.122:443>
jna> DocumentRoot "/usr/web/webroot"
jna> ServerName unix.tcpbbs.net
jna> ServerAdmin root-***@public.gmane.org
jna> ErrorLog /usr/web/logs/unix-error_log
jna> TransferLog /usr/web/logs/unix-access_log
jna> SSLEngine on
jna> SSLCipherSuite
jna> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
jna> SSLCertificateFile /usr/local/apache/conf/ssl.crt/public.crt
jna> SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/myserver.key
jna> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
jna> SSLOptions +StdEnvVars
jna> </Files>
jna> <Directory "/usr/local/apache/cgi-bin">
jna> SSLOptions +StdEnvVars
jna> </Directory>
jna> SetEnvIf User-Agent ".*MSIE.*" \
jna> nokeepalive ssl-unclean-shutdown \
jna> downgrade-1.0 force-response-1.0
jna> CustomLog /usr/local/apache/logs/ssl_request_log \
jna> "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
jna>
jna> </VirtualHost>
jna>
jna>
jna> Again the above shows one non ssl and one ssl host, in actuallity there are
jna> 12 non ssl hosts and 1 ssl host but for simplicity there was no reason to
jna> post all 12 non ssl virtual host section.
jna>
jna> Any idea why I am getting that error and how to rid the server of it so it
jna> will work!?
--
Richard Levitte \ Tunnlandsvägen 3 \ LeViMS-***@public.gmane.org
***@Stacken \ S-168 36 BROMMA \ T: +46-8-26 52 47
\ SWEDEN \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis -- poei-***@public.gmane.org
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 openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Nils Larsch
2003-10-17 12:18:20 UTC
Permalink
Post by Thomas Monjalon
Hello,
I am using RSA_public_encrypt(...) with always the same key and the
same data to encrypt.
Each time it generate different encrypted data.
I would like to know why the results is each time different.
Probably because you use pkcs1 padding (EME-PKCS1-v1_5-Encode,
see pkcs#1) which contains (pseudo)random padding, i.e. the
message to be encrypted (M) is build as follows:
M = 02 || PS || 00 || input, where PS is (pseudo)random.
Post by Thomas Monjalon
Is there a random stuff ? Is it to make encryption more secure ?
Yes, yes

Nils
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Thomas Monjalon
2003-10-17 12:45:22 UTC
Permalink
Thanks a lot !
Post by Nils Larsch
Post by Thomas Monjalon
Hello,
I am using RSA_public_encrypt(...) with always the same key and the
same data to encrypt.
Each time it generate different encrypted data.
I would like to know why the results is each time different.
Probably because you use pkcs1 padding (EME-PKCS1-v1_5-Encode,
I use RSA_PKCS1_PADDING.
Post by Nils Larsch
see pkcs#1) which contains (pseudo)random padding, i.e. the
M = 02 || PS || 00 || input, where PS is (pseudo)random.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Jacques Lebastard
2003-10-17 15:56:57 UTC
Permalink
Post by Thomas Monjalon
Hello,
I am using RSA_public_encrypt(...) with always the same key and the same
data to encrypt.
Each time it generate different encrypted data.
I would like to know why the results is each time different.
Is there a random stuff ? Is it to make encryption more secure ?
I never looked to this part of the code but I just hope the encryption
process adds a randomiser to the input data, just to make sure that two
encryptions of the same data "never" provide the same encrypted data.
--
Mr. Jacques LEBASTARD mailto:jacques.lebastard-***@public.gmane.org
EVIDIAN S.A. www.evidian.com
Rue Jean Jaurès Tel: +33 1 30 80 77 86
F-78340 LES CLAYES SOUS BOIS Fax: +33 1 30 80 77 99

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Jörg Horchler
2003-09-29 16:38:38 UTC
Permalink
Hi again,

I recompiled openssl, mod_ssl and my Apache again. This time I used
'shared' as flag for OpenSSL 'config'. This was necessary to compile
shared libraries (dylib on Mac OS X).

I tried to access my server again using SSL. The result is the same.
Here is whar ssldump writes:

using openssl s_client:

New TCP connection #1: localhost(49510) <-> localhost(443)
1 1 0.0255 (0.0255) C>S Handshake
ClientHello
Version 3.0
cipher suites
Unknown value 0x39
Unknown value 0x38
Unknown value 0x35
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
Unknown value 0x33
Unknown value 0x32
Unknown value 0x2f
SSL_RSA_WITH_IDEA_CBC_SHA
SSL_DHE_DSS_WITH_RC4_128_SHA
SSL_RSA_WITH_RC4_128_SHA
SSL_RSA_WITH_RC4_128_MD5
SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA
SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA
SSL_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_RSA_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_RC2_56_CBC_SHA
SSL_RSA_EXPORT1024_WITH_RC4_56_SHA
SSL_RSA_EXPORT1024_WITH_RC4_56_MD5
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5
SSL_RSA_EXPORT_WITH_RC4_40_MD5
compression methods
NULL
1 2 0.0276 (0.0020) S>C Alert
level fatal
value handshake_failure
1 0.0434 (0.0158) S>C TCP FIN
1 0.0514 (0.0080) C>S TCP FIN


and using my browser:

New TCP connection #1: localhost(49512) <-> localhost(443)
1 1 0.0013 (0.0013) C>S SSLv2 compatible client hello
Version 3.1
cipher suites
TLS_RSA_WITH_3DES_EDE_CBC_SHA
Unknown value 0xff83
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_RC4_128_MD5
TLS_RSA_WITH_DES_CBC_SHA
Unknown value 0xff82
TLS_RSA_EXPORT_WITH_RC4_40_MD5
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA
TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5
SSL_RSA_WITH_RC2_CBC_MD5
TLS_RSA_WITH_NULL_MD5
SSL2_CK_RC4
SSL2_CK_RC4_EXPORT40
SSL2_CK_RC2
SSL2_CK_RC2_EXPORT40
SSL2_CK_DES
SSL2_CK_3DES
1 2 0.1334 (0.1321) S>C Alert
level fatal
value handshake_failure
1 0.1371 (0.0037) S>C TCP FIN
1 0.1379 (0.0008) C>S TCP FIN



I hope this helps to analyze my problem.

Best Regars
Jörg

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Kambourakis Georgios
2003-09-29 16:42:50 UTC
Permalink
MessageThanks a lot Steven
----- Original Message -----
From: Steven Reddie
To: openssl-users-MCmKBN63+***@public.gmane.org
Sent: Monday, September 29, 2003 5:16 PM
Subject: RE: Building problems with Embedded VC++


Hi, the pthread.h and unistd.h headers included by your project aren't available under Windows CE. The unresolved symbols would appear to indicate that you haven't included the built OpenSSL libraries when linking your application. The WinMainCRTStartup unresolved symbol means that you haven't defined an entry point (WinMain) in your application (Note that Windows CE doesn't use main as an entry point, although you can always write a WinMain that calls main).

Regards,

Steven
-----Original Message-----
From: owner-openssl-users-MCmKBN63+***@public.gmane.org [mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] On Behalf Of Kambourakis Georgios
Sent: Monday, 29 September 2003 11:50 PM
To: openssl-users-MCmKBN63+***@public.gmane.org
Subject: Building problems with Embedded VC++


Hi,
Thanks Steven.

I have installed succesfully OpensSSL 0.7.7b for Win CE and
i am trying to build a client app. for pocket PC 2002 (embedded VC++ 3.0)
and i get the following errors:

C:\mob\Mob_project\mob_client\common.h(13): Could not find the file pthread.h.
C:\mob\openssl-0.9.7b\inc32\openssl\kssl.h(72): Could not find the file krb5.h.
C:\mob\Mob_project\mob_client\reentrant.h(5): Could not find the file unistd.h.
Linking...
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_cipher_list referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_ctrl referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_verify referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb_userdata referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_chain_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_load_verify_locations referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSLv23_method referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_write referenced in function do_client_loop
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_clear referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_shutdown referenced in function main
client3.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function main
common.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function post_connection_check
client3.obj : error LNK2019: unresolved external symbol SSL_connect referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_set_bio referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_new referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_ctrl referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_new_connect referenced in function main
common.obj : error LNK2019: unresolved external symbol ERR_print_errors_fp referenced in function handle_error
common.obj : error LNK2019: unresolved external symbol SSL_library_init referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol THREAD_setup referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_NAME_oneline referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_get_issuer_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error_depth referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_current_cert referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol SSL_get_verify_result referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_free referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol stricmp referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_NAME_get_text_by_NID referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_value referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_num referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol ASN1_item_d2i referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509V3_EXT_get referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_nid2sn referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_obj2nid referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_EXTENSION_get_object referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext_count referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function post_connection_check
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup
ARMDbg/mob_client.exe : fatal error LNK1120: 44 unresolved externals
Error executing link.exe.

Any advices ??

Many thanks in advance
Kambourakis Georgios
2003-09-29 17:01:32 UTC
Permalink
MessageOne more question,

is it OK to add the standard C++ include path c:\program files\microsoft visual studio\vc98\include to include directories in embedded VC++ (from menu tools --> options). When i do that pthread.h and unistd.h produce no errors ...

Thanks again
----- Original Message -----
From: Steven Reddie
To: openssl-users-MCmKBN63+***@public.gmane.org
Sent: Monday, September 29, 2003 5:16 PM
Subject: RE: Building problems with Embedded VC++


Hi, the pthread.h and unistd.h headers included by your project aren't available under Windows CE. The unresolved symbols would appear to indicate that you haven't included the built OpenSSL libraries when linking your application. The WinMainCRTStartup unresolved symbol means that you haven't defined an entry point (WinMain) in your application (Note that Windows CE doesn't use main as an entry point, although you can always write a WinMain that calls main).

Regards,

Steven
-----Original Message-----
From: owner-openssl-users-MCmKBN63+***@public.gmane.org [mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] On Behalf Of Kambourakis Georgios
Sent: Monday, 29 September 2003 11:50 PM
To: openssl-users-MCmKBN63+***@public.gmane.org
Subject: Building problems with Embedded VC++


Hi,
Thanks Steven.

I have installed succesfully OpensSSL 0.7.7b for Win CE and
i am trying to build a client app. for pocket PC 2002 (embedded VC++ 3.0)
and i get the following errors:

C:\mob\Mob_project\mob_client\common.h(13): Could not find the file pthread.h.
C:\mob\openssl-0.9.7b\inc32\openssl\kssl.h(72): Could not find the file krb5.h.
C:\mob\Mob_project\mob_client\reentrant.h(5): Could not find the file unistd.h.
Linking...
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_cipher_list referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_ctrl referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_verify referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb_userdata referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_chain_file referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_load_verify_locations referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSLv23_method referenced in function setup_client_ctx
client3.obj : error LNK2019: unresolved external symbol SSL_write referenced in function do_client_loop
client3.obj : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_free referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_clear referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_shutdown referenced in function main
client3.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function main
common.obj : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function post_connection_check
client3.obj : error LNK2019: unresolved external symbol SSL_connect referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_set_bio referenced in function main
client3.obj : error LNK2019: unresolved external symbol SSL_new referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_ctrl referenced in function main
client3.obj : error LNK2019: unresolved external symbol BIO_new_connect referenced in function main
common.obj : error LNK2019: unresolved external symbol ERR_print_errors_fp referenced in function handle_error
common.obj : error LNK2019: unresolved external symbol SSL_library_init referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol THREAD_setup referenced in function init_OpenSSL
common.obj : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_NAME_oneline referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_get_issuer_name referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_error_depth referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol X509_STORE_CTX_get_current_cert referenced in function verify_callback
common.obj : error LNK2019: unresolved external symbol SSL_get_verify_result referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_free referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol stricmp referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_NAME_get_text_by_NID referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_value referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol sk_num referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol ASN1_item_d2i referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509V3_EXT_get referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_nid2sn referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol OBJ_obj2nid referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_EXTENSION_get_object referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol X509_get_ext_count referenced in function post_connection_check
common.obj : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function post_connection_check
corelibc.lib(pegwmain.obj) : error LNK2019: unresolved external symbol WinMain referenced in function WinMainCRTStartup
ARMDbg/mob_client.exe : fatal error LNK1120: 44 unresolved externals
Error executing link.exe.

Any advices ??

Many thanks in advance
Steven Reddie
2003-09-30 00:00:50 UTC
Permalink
No, I wouldn't do that as they wont be compatible with the WinCE libraries.
pthread.h does not exist in that path either. From the information in your
other email I guess that since you use #ifndef WIN32 to protect against
including pthread.h on Windows, and since WIN32 isn't defined by default
(_WIN32 is) that by including the MSVC headers you are getting WIN32 defined
for you. Just change the ifdef's to _WIN32 or add -DWIN32 to your compiler
flags and I think both problems will go away.

Regards,

Steven

-----Original Message-----
From: owner-openssl-users-MCmKBN63+***@public.gmane.org
[mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] On Behalf Of Kambourakis Georgios
Sent: Tuesday, 30 September 2003 3:02 AM
To: openssl-users-MCmKBN63+***@public.gmane.org
Subject: Re: Building problems with Embedded VC++


One more question,

is it OK to add the standard C++ include path c:\program files\microsoft
visual studio\vc98\include to include directories in embedded VC++ (from
menu tools --> options). When i do that pthread.h and unistd.h produce no
errors ...

Thanks again

----- Original Message -----
From: Steven Reddie
To: openssl-users-MCmKBN63+***@public.gmane.org
Sent: Monday, September 29, 2003 5:16 PM
Subject: RE: Building problems with Embedded VC++


Hi, the pthread.h and unistd.h headers included by your project aren't
available under Windows CE. The unresolved symbols would appear to indicate
that you haven't included the built OpenSSL libraries when linking your
application. The WinMainCRTStartup unresolved symbol means that you haven't
defined an entry point (WinMain) in your application (Note that Windows CE
doesn't use main as an entry point, although you can always write a WinMain
that calls main).

Regards,

Steven

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Kambourakis Georgios
2003-09-30 06:54:58 UTC
Permalink
Many thanks Steven

----- Original Message -----
From: "Steven Reddie" <smr-uWgAmU+***@public.gmane.org>
To: <openssl-users-MCmKBN63+***@public.gmane.org>
Sent: Tuesday, September 30, 2003 3:00 AM
Subject: RE: Building problems with Embedded VC++


No, I wouldn't do that as they wont be compatible with the WinCE libraries.
pthread.h does not exist in that path either. From the information in your
other email I guess that since you use #ifndef WIN32 to protect against
including pthread.h on Windows, and since WIN32 isn't defined by default
(_WIN32 is) that by including the MSVC headers you are getting WIN32 defined
for you. Just change the ifdef's to _WIN32 or add -DWIN32 to your compiler
flags and I think both problems will go away.

Regards,

Steven

-----Original Message-----
From: owner-openssl-users-MCmKBN63+***@public.gmane.org
[mailto:owner-openssl-users-MCmKBN63+***@public.gmane.org] On Behalf Of Kambourakis Georgios
Sent: Tuesday, 30 September 2003 3:02 AM
To: openssl-users-MCmKBN63+***@public.gmane.org
Subject: Re: Building problems with Embedded VC++


One more question,

is it OK to add the standard C++ include path c:\program files\microsoft
visual studio\vc98\include to include directories in embedded VC++ (from
menu tools --> options). When i do that pthread.h and unistd.h produce no
errors ...

Thanks again

----- Original Message -----
From: Steven Reddie
To: openssl-users-MCmKBN63+***@public.gmane.org
Sent: Monday, September 29, 2003 5:16 PM
Subject: RE: Building problems with Embedded VC++


Hi, the pthread.h and unistd.h headers included by your project aren't
available under Windows CE. The unresolved symbols would appear to indicate
that you haven't included the built OpenSSL libraries when linking your
application. The WinMainCRTStartup unresolved symbol means that you haven't
defined an entry point (WinMain) in your application (Note that Windows CE
doesn't use main as an entry point, although you can always write a WinMain
that calls main).

Regards,

Steven

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org


______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Loading...