Skip to content
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

Fix EVP_MD_CTX type definition for LibreSSL #550

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

klemensn
Copy link
Contributor

@klemensn klemensn commented Aug 14, 2023

From <openssl/evp.h> aka. EVP_Digest(3), otherwise OpenBSD builds fail:

/usr/include/openssl/ossl_typ.h:103:30: error: type alias redefinition with different types ('struct env_md_ctx_st' vs 'struct evp_md_ctx_st')
typedef struct env_md_ctx_st EVP_MD_CTX;
                             ^
/usr/ports/pobj/libdigidocpp-3.16.0/libdigidocpp-3.16.0/src/crypto/Digest.h:59:7: note: previous definition is here
using EVP_MD_CTX = struct evp_md_ctx_st;

As metsma@ advised, don't include the OpenSSL header in this header to
so as not to introduce build time dependencies to third party usages.

Signed-off-by: Klemens Nanni [email protected]

Copy link
Contributor

@metsma metsma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't expose openssl headers in headers. It will introduce build time dependencies to third party usages

@klemensn
Copy link
Contributor Author

Don't expose openssl headers in headers. It will introduce build time dependencies to third party usages

OK, this should work, then.

@klemensn klemensn changed the title Get EVP_MD_CTX from EVP_Digest(3) to fix LibreSSL build Fix EVP_MD_CTX type definition for LibreSSL Aug 15, 2023
@klemensn klemensn requested a review from metsma August 15, 2023 07:53
@metsma
Copy link
Contributor

metsma commented Aug 24, 2023

Can you please rebase on master. There are fixes for window build issues

From <openssl/evp.h> aka. EVP_Digest(3), otherwise OpenBSD builds fail:

```
/usr/include/openssl/ossl_typ.h:103:30: error: type alias redefinition with different types ('struct env_md_ctx_st' vs 'struct evp_md_ctx_st')
typedef struct env_md_ctx_st EVP_MD_CTX;
                             ^
/usr/ports/pobj/libdigidocpp-3.16.0/libdigidocpp-3.16.0/src/crypto/Digest.h:59:7: note: previous definition is here
using EVP_MD_CTX = struct evp_md_ctx_st;
```

As metsma@ advised, don't include the OpenSSL header in this header to
so as not to introduce build time dependencies to third party usages.

Signed-off-by: Klemens Nanni <[email protected]>
@kristelmerilain kristelmerilain merged commit 4eb9a4d into open-eid:master Aug 31, 2023
18 checks passed
@klemensn klemensn deleted the libressl branch October 19, 2024 20:44
klemensn added a commit to klemensn/libdigidocpp that referenced this pull request Oct 19, 2024
…reSSL

The underlying struct was renamed, in LibreSSL 3.8.2:
openbsd/src@7d242c1

Follow-up to open-eid#550.
klemensn added a commit to klemensn/libdigidocpp that referenced this pull request Oct 19, 2024
…reSSL

The underlying struct was renamed, in LibreSSL 3.8.2:
openbsd/src@7d242c1

Follow-up to open-eid#550.

Signed-off-by: Klemens Nanni <[email protected]>
klemensn added a commit to klemensn/libdigidocpp that referenced this pull request Nov 12, 2024
From <openssl/evp.h> aka. EVP_Digest(3), otherwise OpenBSD builds fail:

```
/usr/include/openssl/ossl_typ.h:103:30: error: type alias redefinition with different types ('struct env_md_ctx_st' vs 'struct evp_md_ctx_st')
typedef struct env_md_ctx_st EVP_MD_CTX;
                             ^
/usr/ports/pobj/libdigidocpp-3.16.0/libdigidocpp-3.16.0/src/crypto/Digest.h:59:7: note: previous definition is here
using EVP_MD_CTX = struct evp_md_ctx_st;
```

As metsma@ advised, don't include the OpenSSL header in this header to
so as not to introduce build time dependencies to third party usages.

Signed-off-by: Klemens Nanni <[email protected]>
klemensn added a commit to klemensn/libdigidocpp that referenced this pull request Nov 12, 2024
…reSSL

The underlying struct was renamed, in LibreSSL 3.8.2:
openbsd/src@7d242c1

Follow-up to open-eid#550.

Signed-off-by: Klemens Nanni <[email protected]>
klemensn added a commit to klemensn/libdigidocpp that referenced this pull request Nov 12, 2024
…reSSL

The underlying struct was renamed, in LibreSSL 3.8.2:
openbsd/src@7d242c1

Follow-up to open-eid#550.

Signed-off-by: Klemens Nanni <[email protected]>
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.

3 participants