Patching Juniper Network Connect for Mac OS 10.5

One of Juniper’s Network Connect libraries is linked to libcrypto.0.9.dylib and libssl.0.9.dylib which are only supplied for ppc in Mac OS 10.5 so Network Connect fails to start up with:

Dyld Error Message:
Library not loaded: /usr/lib/libcrypto.0.9.dylib
Referenced from: /Library/Frameworks/net.juniper.DSCoreServices.framework/Versions/5.4.0/net.juniper.DSCoreServices
Reason: no suitable image found. Did find:
/usr/lib/libcrypto.0.9.dylib: mach-o, but wrong architecture
/usr/lib/libcrypto.0.9.dylib: mach-o, but wrong architecture

chris-lloyds-imac:5.4.0 chris$ otool -L net.juniper.DSCoreServices | grep libcrypto
/usr/lib/libcrypto.0.9.dylib (compatibility version 0.9.0, current version 0.9.6)

0.9.7 is now the version for ppc, ppc64, i386 and x86_64:

chris-lloyds-imac:~ chris$ file /usr/lib/libcrypto.0.9.dylib
/usr/lib/libcrypto.0.9.dylib: Mach-O dynamically linked shared library ppc
chris-lloyds-imac:~ chris$ file /usr/lib/libcrypto.0.9.7.dylib
/usr/lib/libcrypto.0.9.7.dylib: Mach-O universal binary with 4 architectures
/usr/lib/libcrypto.0.9.7.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc
/usr/lib/libcrypto.0.9.7.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64
/usr/lib/libcrypto.0.9.7.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/usr/lib/libcrypto.0.9.7.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

After hex editing the library to switch the versions, diff created with:

chris-lloyds-imac:~ chris$ diff -a net.juniper.DSCoreServices net.juniper.DSCoreServices.patched | uuencode -o patch.txt -

Patch can be applied with:

chris-lloyds-imac:~ chris$ sudo uudecode -p patch.txt | /Library/Frameworks/net.juniper.DSCoreServices.framework/Versions/5.4.0/patch net.juniper.DSCoreServices
patching file net.juniper.DSCoreServices

begin 644 -
M,S8U-F,S-C4V"CP@$137`0``P`<`%-&Y%```"`````0`O3&EB2]&6QI8@`````,````
M-````!@````BR[E#!@D````)```O=7-R+VQI8B]L:6)SBXQ+F1Y
M;&EB````#````&`````8````(LNY0P`7-P(``"P!+U-Y7-T96U#;VYF:6=U7-T96TN0BYD>6QI8@```@```!@````8$P@`V`8`
M`,S)"`!(S0``"P```%````````````````````##!0``PP4``!4!```@@`@`
MPP4``#BN"``!````;*X(`-@&```$>P@`1P$``(QI"``O`@```,`'`&,*+2TM
M"CX@$137`0``P`<`%-&Y%```"`````0`O3&EB2]&BXQ+F1Y;&EB````#```
M`&`````8````(LNY0P`7-P(``"P!+U-Y7-T96TN0BYD>6QI8@```@```!@````8$P@`V`8``,S)"`!(S0``
M"P```%````````````````````##!0``PP4``!4!```@@`@`PP4``#BN"``!
A````;*X(`-@&```$>P@`1P$``(QI"``O`@```,`'`&,*
`
end

Comments