Skip to content

Powershell WSman broken due to OpenSSL 1.0 dependency #78085

@ghost

Description

General troubleshooting steps

  • I have retried my command with --force.
    I ran brew update-reset && brew update and retried my command.
    I ran brew doctor, fixed as many issues as possible and retried my command.
    I have checked the instructions for reporting bugs.
    I made doubly sure this is not a checksum does not match error.

Description of issue

Powershell has a hard dependency on OpenSSL 1.0 at the moment. No remote commands are possible due to the missing dependency after this commit Homebrew/homebrew-core@5c3de7d

otool -L /usr/local/microsoft/powershell/6/libmi.dylib
/usr/local/microsoft/powershell/6/libmi.dylib:
	@rpath/libmi.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/usr/lib/libpam.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)

See PowerShell/PowerShell#11188

Command that failed

$session=New-PSSession -Configuration Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection

Output of command with --force --verbose --debug

n/a

Output of brew cask doctor

n/a

Output of brew tap

n/a

Activity

vitorgalvao

vitorgalvao commented on Mar 4, 2020

@vitorgalvao
Contributor

Open SSL 1.0 was removed because it reached EOL. Had it been for any other reason I’d be open to discussing readding it, but using EOL cryptography software sounds outright dangerous and I doubt we want to participate in that, even if the broken software is (insanely) popular.

powershell (added 1294 days ago)
30 days: 6,089 (#19)
90 days: 15,528 (#20)
365 days: 61,576 (#23)

As it stands, either Powershell updates their dependency or we need to remove the cask (as it’s broken).

Is there an issue that points to a timeframe of them updating the dependency? Is it perhaps already live in a beta we could use?

added
upstreamIssue which needs to be resolved by the upstream project.
on Mar 4, 2020
dijitali

dijitali commented on Mar 4, 2020

@dijitali

@vitorgalvao - the impression I get is that the dependency is no longer needed?

PowerShell/PowerShell#6848
dotnet/corefx#17011

vitorgalvao

vitorgalvao commented on Mar 4, 2020

@vitorgalvao
Contributor
ghost

ghost commented on Mar 5, 2020

@ghost

This should not have been closed. I've tested it in the latest 7.0 and it's still broken

otool -L /usr/local/microsoft/powershell/7/libmi.dylib
libmi.dylib:
        @rpath/libmi.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
        /usr/lib/libpam.2.dylib (compatibility version 3.0.0, current version 3.0.0)
        /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)

Whilst the fix needs to be upstream, and I also understand that including openssl 1.0 is not an option, perhaps adding a message to the cask to inform people that functionality is broken until this issue is resolved.

SKnight79

SKnight79 commented on Dec 4, 2020

@SKnight79

The solution below worked on macOS BigSur 11.0 and PowerShell 7.0.3 with OpenSSL 1.1.1h and OpenSSL 1.0.2t side by side.

#1st install OpenSSL version 1.1.1h (run this once)
/usr/local/bin/brew install openssl

#1st install OpenSSL version 1.0.2t (run this once)
/usr/local/bin/brew extract --version 1.0.2t openssl company/team &&
/usr/local/bin/brew install company/team/openssl@1.0.2t &&
/usr/local/bin/brew pin openssl

Below works with Powershell 7.0.3. Place everything below this line in startup profile script, in a function, or run manually.

#Set link to OpenSSL version 1.0.2t
/bin/rm -Rf /usr/local/opt/openssl; /bin/ln -Ffs /usr/local/Cellar/openssl@1.0.2t/1.0.2t /usr/local/opt/openssl

#Run Powershell
/usr/local/bin/pwsh

#Restore link to OpenSSL version 1.1.1h
/bin/rm -Rf /usr/local/opt/openssl; /bin/ln -Ffs /usr/local/Cellar/openssl@1.1/1.1.1h /usr/local/opt/openssl

vitorgalvao

vitorgalvao commented on Dec 4, 2020

@vitorgalvao
Contributor

This continues to be an upstream matter.

SKnight79

SKnight79 commented on Dec 4, 2020

@SKnight79

My bash/zsh functions are below from .bash_profile.sh and .zsh_profile.sh

pwsh-openssl () {
brew extract --version 1.0.2t openssl company/team &&
brew install company/team/openssl@1.0.2t &&
brew pin openssl
}

pwsh-run () {
#Set link to OpenSSL version 1.0.2t
rm -Rf /usr/local/opt/openssl; ln -Ffs /usr/local/Cellar/openssl@1.0.2t/1.0.2t /usr/local/opt/openssl
/usr/local/bin/pwsh
#Restore link to OpenSSL version 1.1.1h
rm -Rf /usr/local/opt/openssl; ln -Ffs /usr/local/Cellar/openssl@1.1/1.1.1h /usr/local/opt/openssl
}

locked as resolved and limited conversation to collaborators on Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedupstreamIssue which needs to be resolved by the upstream project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @reitermarkus@BrewTestBot@vitorgalvao@dijitali@SKnight79

      Issue actions

        Powershell WSman broken due to OpenSSL 1.0 dependency · Issue #78085 · Homebrew/homebrew-cask