Skip to content

Added instructions for generating ssl files on macOS #54

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

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Added instructions for generating ssl files on macOS #54

merged 1 commit into from
Jan 11, 2021

Conversation

flavioheleno
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets none
Documentation if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
License MIT

What's in this PR?

This PR adds instructions for generating ssl files on macOS, required to run the library's test suite.

Why?

When trying to generate ssl files on macOS Catalina (10.15.7), openssl fails to read the CA private key (check below), this PR adds instructions on how to workaround that problem in a very straightforward way.

$ ./generate.sh 
Generating a 2048 bit RSA private key
......................+++
............+++
writing new private key to stdout
-----BEGIN ENCRYPTED PRIVATE KEY-----
[REDACTED]
-----END ENCRYPTED PRIVATE KEY-----
-----
Generating RSA private key, 2048 bit long modulus
..........................+++
......+++
e is 65537 (0x10001)
Signature ok
subject=/C=FR/ST=Ile-de-France/L=Paris/O=PHP-HTTP/CN=socket-adapter
Getting CA Private Key
Error opening CA Private Key privkey.pem
4361031276:error:02FFF002:system library:func(4095):No such file or directory:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/bio/bss_file.c:255:fopen('privkey.pem', 'r')
4361031276:error:20FFF002:BIO routines:CRYPTO_internal:system lib:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/bio/bss_file.c:257:
unable to load CA Private Key

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

^ Have not done any of these as I don't think it applies to this case.

@joelwurtz joelwurtz merged commit 47e68ca into php-http:master Jan 11, 2021
@flavioheleno flavioheleno deleted the fix/ssl-macos branch January 11, 2021 12:48
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

Successfully merging this pull request may close these issues.

2 participants