https://github.com/jo-tools/macos-openssl-byo
Xojo example project: OpenSSL - byo
https://github.com/jo-tools/macos-openssl-byo
macos openssl xojo
Last synced: 5 months ago
JSON representation
Xojo example project: OpenSSL - byo
- Host: GitHub
- URL: https://github.com/jo-tools/macos-openssl-byo
- Owner: jo-tools
- License: mit
- Created: 2022-02-14T21:52:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T15:02:31.000Z (over 1 year ago)
- Last Synced: 2025-04-06T06:51:15.122Z (over 1 year ago)
- Topics: macos, openssl, xojo
- Language: Xojo
- Homepage: https://www.jo-tools.ch
- Size: 52 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# OpenSSL - byo
Xojo example project
[](LICENSE)
## Description
This example project shows how you can build the [OpenSSL Library](https://openssl-library.org) from Source as a Universal ```.dylib``` *(arm64 and x86_64)*, include it in a Xojo project - and finally use it in your application.
Additionally, this repository also demonstrates how to build [LibreSSL](https://www.libressl.org) as an alternative to OpenSSL.
*LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.*
Included in this repository:
- [How to: Build OpenSSL on macOS](./openssl)
- A [Shell Script](./openssl/3.5/build.sh) you can use as a template to build the [OpenSSL Library](https://openssl-library.org) yourself
- [How to: Build LibreSSL on macOS](./libressl)
- A [Shell Script](./libressl/4.2.1/build.sh) you can use as a template to build [LibreSSL](https://www.libressl.org) yourself
- Example Xojo Project - showing how to bundle your own built ```.dylib```'s in your application
### ScreenShots
Using OpenSSL 3.0.x in a Xojo built application

## Xojo
### Requirements
[Xojo](https://www.xojo.com/) is a rapid application development for Desktop, Web, Mobile & Raspberry Pi.
The Desktop application Xojo example project ```openssl-byo.xojo_project``` is using:
- Xojo 2025r3.1
- API 2
### How to use in your own Xojo project?
1. Open the example project ```openssl-byo.xojo_project```, create a new project - or open your existing project
2. In the Navigator, go to: ```Build Settings -> macOS```
3. Add a ```Post Build Step: Copy Files```
4. Drag in the two built .dylibs: ```libssl.3.5.dylib``` and ```libcrypto.3.5.dylib```
5. Set the Post Build Script behavior in the Inspector:
- Applies to: ```both```
- Subdirectory: ```(empty)```
- Destination: ```Framework folder```
You then can use the bundled OpenSSL Library that you have just built in your own project.
For example: Get the OpenSSL Version like this:
```
Const cryptoLib = "@executable_path/../Frameworks/libcrypto.3.5.dylib"
Declare Function OpenSSL_version Lib cryptoLib (i As Integer) As CString
SomeLabel.Text = OpenSSL_version(0)
```
## About
Juerg Otter is a long term user of Xojo and working for [CM Informatik AG](https://cmiag.ch/). Their Application [CMI LehrerOffice](https://cmi-bildung.ch/) is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some [bits and pieces for Xojo Developers](https://www.jo-tools.ch/).
### Contact
[](mailto:xojo@jo-tools.ch)
[](https://www.facebook.com/juerg.otter)
[](https://twitter.com/juergotter)
### Donation
Do you like this project? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I'd appreciate a [message](mailto:xojo@jo-tools.ch) or a small [donation via PayPal](https://paypal.me/jotools).
[](https://paypal.me/jotools)