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

String slice for 'MINGW' should be 0:5 not 0:6 #231

Closed
rdebath opened this issue Jan 21, 2017 · 8 comments
Closed

String slice for 'MINGW' should be 0:5 not 0:6 #231

rdebath opened this issue Jan 21, 2017 · 8 comments

Comments

@rdebath
Copy link
Contributor

rdebath commented Jan 21, 2017

See title.

get_os() { # function to get the current Operating System
  uname_res=$(uname -s)
  if [[ $(date -h 2>&1 | grep -ic busybox) -gt 0 ]]; then
    os="busybox"
  elif [[ ${uname_res} == "Linux" ]]; then
    os="linux"
  elif [[ ${uname_res} == "FreeBSD" ]]; then
    os="bsd"
  elif [[ ${uname_res} == "Darwin" ]]; then
    os="mac"
  elif [[ ${uname_res:0:6} == "CYGWIN" ]]; then
    os="cygwin"
  elif [[ ${uname_res:0:6} == "MINGW" ]]; then
    os="mingw"
  else
    os="unknown"
  fi
  debug "detected os type = $os"
}
@rdebath
Copy link
Contributor Author

rdebath commented Jan 21, 2017

Also, CSR_SUBJECT is not set to "//" for mingw by default (feature removed by 196bd2c )

This meant getssl generated an empty (invalid) csr file.

@srvrco
Copy link
Collaborator

srvrco commented Jan 21, 2017

It was modified - so you can specify CSR_SUBJECT in the config file

I will modify the "mingw" to 5, although I don't think it's currently used since the CSR_SUBJECT is now available.

@rdebath
Copy link
Contributor Author

rdebath commented Jan 21, 2017

Yes I set CSR_SUBJECT in the config file for that machine ... but I've no idea why I did it.

... oh right ... I can ask git ... #189 ... WTF!

I think you're going to end up writing code or documentation for that; it's just too weird.

BTW: It may be of interest to you that the Mingw I'm using is the git package from git-scm.com

@srvrco
Copy link
Collaborator

srvrco commented Jan 21, 2017

Did it work for you when you set CSR_SUBJECT="//" in the config ?

@rdebath
Copy link
Contributor Author

rdebath commented Jan 21, 2017

Yes, it works correctly. I had to configure IIS to work nicely with extensionless files but otherwise everything was pretty painless. I haven't tried to automatically import the certificate into IIS though, that was not what I want the certificate for,

@srvrco
Copy link
Collaborator

srvrco commented Jan 21, 2017

Great ( that's the most important bit sorted :) )

I will correct the mingw issue and set the default

@srvrco
Copy link
Collaborator

srvrco commented Jan 21, 2017

Thanks, I've uploaded a bug fix.

@srvrco srvrco closed this as completed Jan 21, 2017
@rdebath
Copy link
Contributor Author

rdebath commented Jan 21, 2017

Test: Passed

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

1 participant