Skip to content

Fix EVP_MD_CTX type definition for LibreSSL#550

Merged
kristelmerilain merged 1 commit intoopen-eid:masterfrom
klemensn:libressl
Aug 31, 2023
Merged

Fix EVP_MD_CTX type definition for LibreSSL#550
kristelmerilain merged 1 commit intoopen-eid:masterfrom
klemensn:libressl

Conversation

@klemensn
Copy link
Copy Markdown
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]

@kristelmerilain kristelmerilain requested a review from metsma August 15, 2023 06:28
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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]>
kristelmerilain pushed a commit that referenced this pull request Dec 2, 2024
…reSSL (#636)

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

Follow-up to #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