Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when I try to execute cfssl config #1157

Closed
Iwios opened this issue Nov 2, 2022 · 5 comments
Closed

Error when I try to execute cfssl config #1157

Iwios opened this issue Nov 2, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Iwios
Copy link

Iwios commented Nov 2, 2022

Describe the bug
When I try to launch occ libresign:configure:cfssl I have this return :

An unhandled exception has been thrown:
TypeError: Argument 6 passed to OCA\Libresign\Service\InstallService::generate() must be of the type string, null given, called in /var/www/html/nextcloud/apps/libresign/lib/Command/Configure/Cfssl.php on line 101 and defined in /var/www/html/nextcloud/apps/libresign/lib/Service/InstallService.php:512
Stack trace:
#0 /var/www/html/nextcloud/apps/libresign/lib/Command/Configure/Cfssl.php(101): OCA\Libresign\Service\InstallService->generate()
#1 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Libresign\Command\Configure\Cfssl->execute()
#2 /var/www/html/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run()
#3 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#4 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#5 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#6 /var/www/html/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#7 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run()
#8 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
#9 {main}

To Reproduce
Steps to reproduce the behavior:

  • Launch this command line : sudo -u user_with_right_to_execute php occ libresign:configure:cfssl --cn Mycompany --ou IT -o Mycompany -c France

And when I try to execute the same thing in the web interface I have this :

Impossible de générer le certificat.
Endpoint /health of CFSSL server not found. Maybe you are using incompatible version of CFSSL server. Use latests version.

image

Havr a good day

@Iwios Iwios added the bug Something isn't working label Nov 2, 2022
@TahomaSoft
Copy link

I've been looking at the code for the various parts of LibreSign's cfssl code, and there are internal inconsistencies on the data structures between routines.

@Iwios
Copy link
Author

Iwios commented Nov 14, 2022

Hello,
Ok and this is possible to show here the inconsistencies?

@TahomaSoft
Copy link

Bom Dia! (good morning)

Yes: Note though that I was using the version of LibreSign that came from the NextCloud app page (downloaded on or about 10 November), which might not be the most current. The issue isn't jumping out at me looking at the latest git pull.

Here's the area I was looking at in brief:

In files:
./lib/Command/Configure/Cfssl.php
./lib/Handler/CfsslHandler.php
./lib/Handler/CfsslServerHandler.php

The structure "$names", which handles the name details of the X509 certificate (
Relative Distinguished Names, aka RDN, aka:

  • CN: CommonName

  • OU: OrganizationalUnit

  • O: Organization

  • L: Locality

  • S: StateOrProvinceName

  • C: CountryName

                                                                                                                                 )
    

did not seem to be consistent across these files. I was having problems getting cfssl to work, and looking at the 'debug' traces, these seemed to be the areas that were not working correctly.

Thanks,

Erik

@TahomaSoft
Copy link

See also:
#1108

@vitormattos
Copy link
Member

Install the newest release compatible with stable25 and do a new test.
If the problem persist, reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants