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

OpenSSL problem on Windows #48

Closed
nueko opened this issue Aug 23, 2016 · 11 comments
Closed

OpenSSL problem on Windows #48

nueko opened this issue Aug 23, 2016 · 11 comments

Comments

@nueko
Copy link

nueko commented Aug 23, 2016

Hi, I found this

'openssl' is not recognized as an internal or external command, operable program or batch file.

when running

php artisan passport:install

on Windows without openssl installed.

@nueko
Copy link
Author

nueko commented Aug 23, 2016

I think the better solution is using openssl_pkey_new function.

@gbdematos
Copy link

gbdematos commented Aug 23, 2016

Can this, by any chance, be causing the Issue I just opened?
#47

I had the same openssl problem when installing Passport, so I downloaded the zip from openssl website, then extracted (only) openssl.exe and included it in the environment path.

This made the installation work, but I'm having the mentioned issue. It's the only thing I made different from Taylor on the Laracast video, this is why I wonder if the two problems are related...

@nueko
Copy link
Author

nueko commented Aug 23, 2016

For the #47, I'll try to check it out. but, Have you tried the Git Bash to run the command?

php artisan passport:install

@nueko
Copy link
Author

nueko commented Aug 23, 2016

also, @gbdematos please make sure that ./storage/oauth-private.key and ./storage/oauth-public.key exist

@gbdematos
Copy link

@nueko tried with Git Bash, unsuccessful. I also deleted openssl.exe and tried again (because the command works on Git Bash without openssl installed), the problem persists... :(

Both oauth-private and oauth-public keys are correctly placed.

When I paste the generated Personal Token on jwt.io, even without pasting the oAuth keys to verify the signature, I see that "exp" value is 0 (zero). I think the problem is related to this... because when validating, it goes through all the values in the Token: aud, jti, iat, nbf, exp and sub... I have no idea what any of those mean, but I saw that the only "false" return is from the "exp" validation.

@blaize9
Copy link

blaize9 commented Aug 24, 2016

  1. Download GnuWin
  2. Extract bin/openssl.exe into a Environment Variable Path directory (You can create your own bin folder in your user folder or something and add that path to the Path Variable)
  3. Make a new CMD window (Existing ones will not get the newly added path)
  4. run php artisan passport:install

@alexbilbie
Copy link
Contributor

At some point in the new future league/oauth2-server won't require key based cryptography if you don't require it. Laravel Passport will be updated in turn to support this simpler use case.

@talevskiigor
Copy link

Also installing win32/64 bin file from: https://slproweb.com/products/Win32OpenSSL.html and add to Environment Variable Path directory solve the problem.

@taftse
Copy link

taftse commented Aug 28, 2016

I ended up downloading the binaries from http://gnuwin32.sourceforge.net/packages/openssl.htm and then only copied over the openssl.exe file and placed it in my php route directory which resolved the issue

@aseipp
Copy link

aseipp commented Sep 2, 2016

FWIW I was able to solve this by using Git Bash in the directory. Oh the joys of development on windows!

@samgreenwood
Copy link
Contributor

Pull request that solves this here #72

@nueko nueko closed this as completed Sep 14, 2016
utsavsomaiya added a commit to utsavsomaiya/passport that referenced this issue Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants