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

Support for OpenSSL up to 3.1.x #93

Closed
wants to merge 3 commits into from
Closed

Support for OpenSSL up to 3.1.x #93

wants to merge 3 commits into from

Conversation

fferino-fungible
Copy link

No description provided.

@fferino-fungible fferino-fungible changed the title Support for OpenSSL 3.0.x Support for OpenSSL up to 3.1.x Apr 11, 2023
@TrinityTonic
Copy link

This would actually be quite nice to have. However we tried this with your proposed change and openssl v3 and compilation went successful. However later on when we wantedto use the library, there were some linker errors, that some symbols had been defined multiple times. Honestly I doubt that this would be related to your updates, however I'm not sure. Check the jenkings output where we wanted to link the oss.tpm to one of our apps and use it for testing.

+ ./cx-build build
[golang-lib: build => web.licensemanager-1.5.0-feature.floatingServer.8]
go build -mod=vendor ./...
# lo-stash.de.bosch.com/icx/web.licensemanager.git/cmd/licensemanager
/snap/go/current/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x8): multiple definition of `s_realTimePrevious'; /tmp/go-link-294997129/000048.o:(.bss+0x8): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x10): multiple definition of `s_lastSystemTime'; /tmp/go-link-294997129/000048.o:(.bss+0x18): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x18): multiple definition of `s_lastReportedTime'; /tmp/go-link-294997129/000048.o:(.bss+0x20): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x20): multiple definition of `s_tpmTime'; /tmp/go-link-294997129/000048.o:(.bss+0x10): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x28): multiple definition of `s_timerReset'; /tmp/go-link-294997129/000048.o:(.bss+0x4): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x38): multiple definition of `s_adjustRate'; /tmp/go-link-294997129/000048.o:(.bss+0x0): first defined here
/usr/bin/ld: /home/jenkins/agent/workspace/semanager_feature_floatingServer@2/deps/ms-tpm-20-ref/amd64/lib/libplatform.a(libplatform_a-PlatformData.o):(.bss+0x40): multiple definition of `s_NV'; /tmp/go-link-294997129/000050.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status


@fferino-fungible
Copy link
Author

@TrinityTonic it's difficult to be 100% sure what is going on with your build.

However, if you look for the variables that are are reported as multiply defined, they are in the header file with an EXTERN macro :

EXTERN clock64_t s_realTimePrevious;
.

And this EXTERN macro maps either to nothing or to the "extern" C keyword depending on whether the macro PLATFORM_DATA_C is defined.

So depending on how you build the TPM library, you will either have one, many or no definitions of these variables in your build of the TPM library. In your case, you seem to have either multiple definitions or at least one with another definition provided with the other components in your link so PLATFORM_DATA_C was defined in your build of the TPM library.

I would try first to rebuild the library with PLATFORM_DATA_C undefined.

It will either fix the problem (the variables are provided by another component of your build) or you will get an "undefined" or "missing definition" link error. If the latter, then your toolchain treats uninitialized global variables as common symbols (cf. the "Mac OS X build" of the README.md) https://github.com/microsoft/ms-tpm-20-ref/blob/main/README.md#mac-os-x-build and you will need to change your compiler/linker flags.

I hope this helps.

sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 13, 2023
Now the ms-tpm-20-ref is not support openssl3.1.1,
we need to add the patch,  that is refer to the
PR:microsoft/ms-tpm-20-ref#93

If the ms-tpm-20-ref done it, the commit need drop.

Signed-off-by: Sun, Ceping <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 17, 2023
Now the ms-tpm-20-ref is not support openssl3.1.1,
we need to add the patch,  that is refer to the
PR:microsoft/ms-tpm-20-ref#93

If the ms-tpm-20-ref done it, the commit need drop.

Signed-off-by: Sun, Ceping <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 17, 2023
Now the ms-tpm-20-ref is not support openssl3.1.1,
we need to add the patch,  that is refer to the
PR:microsoft/ms-tpm-20-ref#93

If the ms-tpm-20-ref done it, the commit need drop.

Signed-off-by: Sun, Ceping <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 18, 2023
Refer to the PR:microsoft/ms-tpm-20-ref#93
If the PR was merged, this commit would be dropped.

Signed-off-by: Sun, Ceping <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 18, 2023
Refer to the PR:microsoft/ms-tpm-20-ref#93
If the PR is merged, this commit will be dropped.

Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 18, 2023
Refer to the PR:microsoft/ms-tpm-20-ref#93
If the PR is merged, this commit will be dropped.

Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
sunceping added a commit to sunceping/vtpm-td that referenced this pull request Jul 18, 2023
Refer to the PR:microsoft/ms-tpm-20-ref#93
If the PR is merged, this commit will be dropped.

Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
mxu9 pushed a commit to intel/vtpm-td that referenced this pull request Jul 19, 2023
Refer to the PR:microsoft/ms-tpm-20-ref#93
If the PR is merged, this commit will be dropped.

Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
@wxleong
Copy link

wxleong commented Jan 27, 2024

Any plan to accept this PR?

@bradlitterell
Copy link
Contributor

Our plan is to update this repo with the next public version of the code which is currently being worked on which has a similar change.

@wxleong
Copy link

wxleong commented Feb 1, 2024

Any estimated timeframe for this public release?

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.

4 participants