Skip to content

Commit

Permalink
openssl consumers need to know the location of the cert bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
jhheider committed Sep 30, 2022
1 parent 419b2b8 commit f988df9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/hooks/useShellEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const EnvKeys = [
'CPATH',
'XDG_DATA_DIRS',
'CMAKE_PREFIX_PATH',
'DYLD_FALLBACK_LIBRARY_PATH'
'DYLD_FALLBACK_LIBRARY_PATH',
'SSL_CERT_FILE'
]

interface Response {
Expand Down Expand Up @@ -54,6 +55,11 @@ export default function useShellEnv(installations: Installation[], pending: Pack
vars.ACLOCAL_PATH ??= []
vars.ACLOCAL_PATH.compact_unshift(installation.path.join("share/aclocal").compact()?.string)
}

if (installation.pkg.project === 'openssl.org') {
vars.SSL_CERT_FILE ??= []
vars.SSL_CERT_FILE.compact_unshift(installation.path.join("ssl/cert.pem").compact()?.string)
}
}

// needed since on Linux library paths aren’t automatically included when linking
Expand Down Expand Up @@ -105,6 +111,7 @@ function suffixes(key: string) {
case 'DYLD_FALLBACK_LIBRARY_PATH':
case 'CPATH':
case 'CMAKE_PREFIX_PATH':
case 'SSL_CERT_FILE':
return [] // we handle these specially
default:
throw new Error("unhandled")
Expand Down

0 comments on commit f988df9

Please sign in to comment.