Project

General

Profile

Bug #401

Issue running pubkey_speed && pubkey_speed.sh‏

Added by Charles Ibrahim almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
03.09.2013
Due date:
Estimated time:
Affected version:
5.1.0
Resolution:
Fixed

Description

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 :

$ ./configure --enable-openssl

then of course :

$ make && sudo make install

Using the script pubkey_speed.sh from 5.1.1 (but it's actually an old script :) ), I get:

$ 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
...

I encounter the same problem with gmp, gcrypt, or openssl (the latter's installation being effective, of course)
which means with:

$ ./configure --enable-openssl --enable-gcrypt --enable-gmp

...and for rsa and ecdsa crypto as well...

Simply debugging by writing :

    printf("-lib->creds->create");
    private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type,
                                 BUILD_BLOB_PEM, keydata, BUILD_END);
    printf("+lib->creds->create");

in pubkey_speed.c, I get (./configure --enable-openssl --enable-gcrypt --enable-gmp case):

$ ./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.
...

Thus, the line responsible for my issue seems to be :

private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, type, BUILD_BLOB_PEM, keydata, BUILD_END);

... 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 :

usage: pubkey_speed plugins rsa|ecdsa rounds

whereas pubkey_speed needs a key "to pipe from".

Best regards,

Charles Ibrahim

Associated revisions

Revision 0b47bb53 (diff)
Added by Tobias Brunner almost 5 years ago

pubkey_speed: Add missing plugins

The pkcs1 plugin is required to test the gmp/gcrypt plugins. Likewise,
the pem plugin is required when testing the openssl plugin.

Fixes #401.

History

#1 Updated by Tobias Brunner almost 5 years ago

  • Tracker changed from Issue to Bug
  • Description updated (diff)
  • Status changed from New to Resolved
  • Assignee set to Tobias Brunner
  • Target version set to 5.1.1
  • Resolution set to Fixed

The problem is that the pkcs1 plugin is required to decode the RSA private key in the PKCS#1 format. Likewise, the pem plugin is required when the openssl plugin is used. The associated commit fixes these issues.

#2 Updated by Charles Ibrahim almost 5 years ago

Thanks !

#3 Updated by Tobias Brunner almost 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF