Code Monkey home page Code Monkey logo

Comments (5)

lamont-granquist avatar lamont-granquist commented on June 30, 2024

That is a bug with the compilation environment on windows and the ed25519 gem, that has nothing to do with this gem directly.

It will get solved in the next release of chef-client which will bundle the ed25519 gem again. I don't know what the workaround is in the meantime.

from kitchen-nodes.

jeremyciak avatar jeremyciak commented on June 30, 2024

@lamont-granquist do you know of the latest version of the Chef Infra Client where this bug is not present? Also, the only reason I'm pursuing jumping to a super recent version is due to the remote_file error I get currently due to the recent Let's Encrypt CA certificate expiration as outlined in this post. If there is a way to resolve that issue without needing to upgrade the Chef Infra Client version then I can pursue that while this ed25519 gem issue is resolved.

I also posted about all of this on the Chef Community Slack Channel:
https://chefcommunity.slack.com/archives/C0M1NGZE3/p1633541353177900

from kitchen-nodes.

lamont-granquist avatar lamont-granquist commented on June 30, 2024

The latest version of chef-client fixes letsencrypt it does not fix the ed25519 problem.

You need to manaually fix both c:/opscode/chef/embedded/ssl/certs/cacert.pem and c:/opscode/chef/embedded/ssl/cert.pem on windows.

from kitchen-nodes.

jeremyciak avatar jeremyciak commented on June 30, 2024

@lamont-granquist
How do I manually fix both of those on Windows? Can you offer any guidance on that? Or direct me to a post where someone has outlined those steps?

from kitchen-nodes.

jeremyciak avatar jeremyciak commented on June 30, 2024

For others' benefit, we added this code to a Chef recipe to fix the issue on our Windows machines:

ca_cert_match = 'DST Root CA X3'

cacert_test = powershell_out(
  "
    $chefPath = 'C:\\opscode\\chef\\embedded'
    $certPath = [System.IO.Path]::Combine($chefPath,'ssl','certs','cacert.pem')
    $test1 = Select-String -Pattern '#{ca_cert_match}' -Path $certPath -Quiet
    $certPath = [System.IO.Path]::Combine($chefPath,'ssl','cert.pem')
    $test2 = Select-String -Pattern '#{ca_cert_match}' -Path $certPath -Quiet
    return ($test1 -or $test2)
  ").stdout.chomp().to_s.downcase

powershell_script 'Chef Client Fix cacert.pem' do
  code <<-EOH
  $dtStamp = (Get-Date).ToString('yyyyMMddHHmmss')
  $chefPath = 'C:\\opscode\\chef\\embedded'
  $chefBin = [System.IO.Path]::Combine($chefPath,'bin')
  $certPath = [System.IO.Path]::Combine($chefPath,'ssl','certs','cacert.pem')
  # create backup copy cacert.pem
  Copy-Item -Path "$certPath" -Destination "$($certPath).bak.$($dtStamp)"
  # remove expired cert from cacert.pem
  & "$($chefBin)\\sed.exe" -i '' '/#{ca_cert_match}/,/^$/ d' "$certPath"
  # create backup copy cert.pem
  $certPath = [System.IO.Path]::Combine($chefPath,'ssl','cert.pem')
  Copy-Item -Path "$certPath" -Destination "$($certPath).bak.$($dtStamp)"
  # remove expired cert from cert.pem
  & "$($chefBin)\\sed.exe" -i '' '/#{ca_cert_match}/,/^$/ d' "$certPath"
  EOH
  only_if { cacert_test == 'true' }
end

from kitchen-nodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.