Skip to content

Comments

Make openVMS seeding less dependent of OpenVMS version [master, 3.1, 3.0]#18731

Closed
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-18727
Closed

Make openVMS seeding less dependent of OpenVMS version [master, 3.1, 3.0]#18731
levitte wants to merge 2 commits intoopenssl:masterfrom
levitte:fix-18727

Conversation

@levitte
Copy link
Member

@levitte levitte commented Jul 6, 2022

SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVMS
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes #18727

@levitte levitte added approval: otc review pending approval: review pending This pull request needs review by a committer branch: 3.0 Applies to openssl-3.0 branch branch: master Applies to master branch labels Jul 6, 2022
@levitte
Copy link
Member Author

levitte commented Jul 6, 2022

This is the port of #18730 for higher OpenSSL versions

@t8m t8m added triaged: bug The issue/pr is/fixes a bug triaged: feature The issue/pr requests/adds a feature labels Jul 7, 2022
@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 61 days ago

@hlandau
Copy link
Member

hlandau commented Sep 9, 2022

I expect this is having difficulty getting reviews due to lack of VMS experience.

Though I have no direct experience with VMS, this patch looks right to me, and I've read the reference material for the relevant VMS system calls and think it makes sense. Moreover, there is a third party report of this working in #18727. So I'm approving this.

@hlandau hlandau removed the approval: review pending This pull request needs review by a committer label Sep 9, 2022
@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@t8m
Copy link
Member

t8m commented Oct 24, 2022

@levitte this is waiting on update

@t8m t8m added the branch: 3.1 Applies to openssl-3.1 (EOL) label Oct 24, 2022
@levitte
Copy link
Member Author

levitte commented Oct 24, 2022

Yes I know. I've been away on other stuff, but I actually started looking again this morning.

@levitte levitte changed the title Make openVMS seeding less dependent of OpenVMS version [master, 3.0] Make openVMS seeding less dependent of OpenVMS version [master, 3.1, 3.0] Oct 25, 2022
@levitte
Copy link
Member Author

levitte commented Oct 25, 2022

Rebased on a fresher master, and changes completely remade with data
from VSI forum discussions in mind.

@levitte
Copy link
Member Author

levitte commented Oct 25, 2022

Do note that this change assumes that ossl_pool_add_nonce_data() is called under lock. I haven't checked this myself, but have been told this by @paulidale.

@levitte levitte added approval: review pending This pull request needs review by a committer approval: otc review pending labels Oct 25, 2022
@levitte levitte requested a review from hlandau October 25, 2022 11:49
@t8m t8m removed the triaged: feature The issue/pr requests/adds a feature label Oct 25, 2022
Copy link
Member

@hlandau hlandau left a comment

Choose a reason for hiding this comment

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

One nit, otherwise looks good.

@levitte
Copy link
Member Author

levitte commented Oct 25, 2022

Apparently, I hadn't rebase on a fresh enough master, and got some pyca related build failures.
I've rebased again now, hoping that makes things better... albeit not really relevant for this PR

@levitte
Copy link
Member Author

levitte commented Oct 26, 2022

@mgdaniel, if you wanna test on openssl 3.0, this is the appropriate URL for rand_vms.c.
Although, mind you, the 1.1.1 change is exactly the same in practice, so it should be sufficient for us if you try that.

https://raw.githubusercontent.com/openssl/openssl/ba0127fa7c73c7f64d2f96b214c51482256b3546/providers/implementations/rands/seeding/rand_vms.c

@hlandau hlandau added approval: done This pull request has the required number of approvals approval: review pending This pull request needs review by a committer and removed approval: review pending This pull request needs review by a committer approval: done This pull request has the required number of approvals labels Oct 26, 2022
@hlandau
Copy link
Member

hlandau commented Oct 26, 2022

@t8m Reapprove?

@levitte levitte requested a review from t8m October 26, 2022 09:16
@t8m t8m added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Oct 26, 2022
@mgdaniel
Copy link

mgdaniel commented Oct 26, 2022 via email

@levitte
Copy link
Member Author

levitte commented Oct 26, 2022

Great! Thanks for the help, @mgdaniel

SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes openssl#18727
@levitte
Copy link
Member Author

levitte commented Oct 27, 2022

#19493 removes ossl_rand_pool_add_additional_data(), so that removal could be dropped from this PR with a rebase.

openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes #18727

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #18731)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes #18727

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #18731)

(cherry picked from commit 7056dc9)
openssl-machine pushed a commit that referenced this pull request Oct 27, 2022
SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes #18727

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #18731)

(cherry picked from commit 7056dc9)
@levitte
Copy link
Member Author

levitte commented Oct 27, 2022

Merged

master:

7056dc9 Make openVMS seeding less dependent of OpenVMS version

3.1:

868141d Make openVMS seeding less dependent of OpenVMS version

3.0:

bc84a93 Make openVMS seeding less dependent of OpenVMS version

NOTE: I kept the removal of ossl_rand_pool_add_additional_data() in
the cherry pick to 3.0, since #19493 wasn't applied in that branch.

@levitte levitte closed this Oct 27, 2022
@levitte levitte deleted the fix-18727 branch October 27, 2022 10:45
beldmit pushed a commit to beldmit/openssl that referenced this pull request Dec 26, 2022
SYS$GETTIM_PREC is a very new function, only available on OpenVMS v8.4.
OpenSSL binaries built on OpenVMS v8.4 become unusable on older OpenVM
versions, but building for the older CRTL version will make the high
precision time functions unavailable.

Tests have shown that on Alpha and Itanium, the time update granularity
between SYS$GETTIM and SYS$GETTIM_PREC is marginal, so the former plus
a sequence number turns out to be better to guarantee a unique nonce.

Fixes openssl#18727

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#18731)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch branch: 3.1 Applies to openssl-3.1 (EOL) triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenVMS rand_vms.c dependency

7 participants