Skip to content

rand: add getter of the current rand seed source#27442

Draft
xnox wants to merge 1 commit intoopenssl:masterfrom
xnox:seed-source-getter
Draft

rand: add getter of the current rand seed source#27442
xnox wants to merge 1 commit intoopenssl:masterfrom
xnox:seed-source-getter

Conversation

@xnox
Copy link
Contributor

@xnox xnox commented Apr 19, 2025

Add RAND_get_seed_source_name function to query the currently
active/configured/default seed source name.

This helps to query which seed source is used by default
programatically. And it also helps to display this information for the
users and auditors, when both SEED-SRC and JITTER are available. As
well as third-party seed sources (possibly wolfcrypt).

$ ./util/wrap.pl ./apps/openssl version -r
Seeding source: os-specific JITTER (3050000)
Active seed type: SEED-SRC

$ ./util/wrap.pl -jitter ./apps/openssl version -r
Seeding source: os-specific JITTER (3050000)
Active seed type: JITTER

@xnox xnox marked this pull request as draft April 19, 2025 22:37
Add RAND_get_seed_source_name function to query the currently
active/configured/default seed source name.

This helps to query which seed source is used by default
programatically. And it also helps to display this information for the
users and auditors, when both SEED-SRC and JITTER are available. As
well as third-party seed sources (possibly wolfcrypt).

    $ ./util/wrap.pl ./apps/openssl version -r
    Seeding source: os-specific JITTER (3050000)
    Active seed type: SEED-SRC

    $ ./util/wrap.pl -jitter ./apps/openssl version -r
    Seeding source: os-specific JITTER (3050000)
    Active seed type: JITTER
@xnox xnox force-pushed the seed-source-getter branch from 7766d20 to 35dc18f Compare April 19, 2025 22:40
@github-actions github-actions bot added severity: fips change The pull request changes FIPS provider sources severity: ABI change This pull request contains ABI changes labels Apr 19, 2025
&& random_set_string(&dgbl->seed_propq, propq);
}

const char* RAND_get_seed_source_name(OSSL_LIB_CTX *ctx)
Copy link
Contributor

Choose a reason for hiding this comment

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

RAND_get0_seed_source_name I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

severity: ABI change This pull request contains ABI changes severity: fips change The pull request changes FIPS provider sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants