Bug #401
Updated by Tobias Brunner about 12 years ago
Hi,
I'm experiencing an issue running speed tests with scripts/pubkey_speed from the latest stable release 5.1.0.
Precisely, I configured strongswan like this :
<pre>
$ ./configure --enable-openssl
</pre>
then of course :
<pre>
$ make && sudo make install
</pre>
Using the script @pubkey_speed.sh@ pubkey_speed.sh from 5.1.1 (but it's actually an old script :) ), I get:
<pre>
$ sudo ./pubkey_speed.sh
testing: gmp gcrypt pem
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 2 builders
parsing private key failed.
e=f4 building CRED_PRIVATE_KEY - RSA failed, tried 2 builders
...
</pre>
I encounter the same problem with gmp, gcrypt, or openssl (the latter's installation being effective, of course)
which means with:
<pre>
$ ./configure --enable-openssl --enable-gcrypt --enable-gmp
</pre>
...and for rsa and ecdsa crypto as well...
Simply debugging by writing :
<pre><code class="c">
printf("-lib->creds->create");
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type,
BUILD_BLOB_PEM, keydata, BUILD_END);
printf("+lib->creds->create");
</code></pre>
in @pubkey_speed.c@, pubkey_speed.c, I get (@./configure ("./configure --enable-openssl --enable-gcrypt --enable-gmp@ --enable-gmp" case):
<pre>
$ ./pubkey_speed.sh
testing: gmp gcrypt pem
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
e=f4 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
...
</pre>
Thus, the line responsible for my issue seems to be :
<pre><code class="c">
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type, BUILD_BLOB_PEM, keydata, BUILD_END);
</code></pre>
... but I can't figure out why... hence this message.
Thank you very much in advance for any help !
And by the way, pubkey_speed usage says :
<pre>
usage: pubkey_speed plugins rsa|ecdsa rounds
</pre>
whereas pubkey_speed needs a key "to pipe from".
Best regards,
Charles Ibrahim
I'm experiencing an issue running speed tests with scripts/pubkey_speed from the latest stable release 5.1.0.
Precisely, I configured strongswan like this :
<pre>
$ ./configure --enable-openssl
</pre>
then of course :
<pre>
$ make && sudo make install
</pre>
Using the script @pubkey_speed.sh@ pubkey_speed.sh from 5.1.1 (but it's actually an old script :) ), I get:
<pre>
$ sudo ./pubkey_speed.sh
testing: gmp gcrypt pem
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 2 builders
parsing private key failed.
e=f4 building CRED_PRIVATE_KEY - RSA failed, tried 2 builders
...
</pre>
I encounter the same problem with gmp, gcrypt, or openssl (the latter's installation being effective, of course)
which means with:
<pre>
$ ./configure --enable-openssl --enable-gcrypt --enable-gmp
</pre>
...and for rsa and ecdsa crypto as well...
Simply debugging by writing :
<pre><code class="c">
printf("-lib->creds->create");
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type,
BUILD_BLOB_PEM, keydata, BUILD_END);
printf("+lib->creds->create");
</code></pre>
in @pubkey_speed.c@, pubkey_speed.c, I get (@./configure ("./configure --enable-openssl --enable-gcrypt --enable-gmp@ --enable-gmp" case):
<pre>
$ ./pubkey_speed.sh
testing: gmp gcrypt pem
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
e=f4 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
e=3 building CRED_PRIVATE_KEY - RSA failed, tried 5 builders
-lib->creds->create+lib->creds->createparsing private key failed.
...
</pre>
Thus, the line responsible for my issue seems to be :
<pre><code class="c">
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type, BUILD_BLOB_PEM, keydata, BUILD_END);
</code></pre>
... but I can't figure out why... hence this message.
Thank you very much in advance for any help !
And by the way, pubkey_speed usage says :
<pre>
usage: pubkey_speed plugins rsa|ecdsa rounds
</pre>
whereas pubkey_speed needs a key "to pipe from".
Best regards,
Charles Ibrahim