Skip to content

Possible PKCS#11 regression #810

Description

@LawrenceHunter

Between ebf6ff7 and HEAD a change has been made which causes the attached build error. I believe it to be 4f296fa from #794.

Author of #794: @ruiliio
Approver of #794: @jschlyter

If this is intentional what are the expected code changes and is it intentional to not be backwards compatible?

In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
In file included from <>,
                 from <>:
<>/usr/include/softhsm/pkcs11.h:984:3: error: unknown type name 'ck_rsa_pkcs_oaep_params'
   ck_rsa_pkcs_oaep_params *oaep_params;
   ^~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [<>] Error 1
gmake[2]: *** Waiting for unfinished jobs....

Activity

  1. ruiliio commented on Aug 19, 2025

    @ruiliio
    Contributor

    I tried this in a fresh Docker and also on my local machine, and the build worked fine in both cases. Could you share the exact steps you used to reproduce the error? That might help narrow down what’s going on.

  2. LawrenceHunter commented on Aug 20, 2025

    @LawrenceHunter
    ContributorAuthor

    Hello,

    I cannot share where it is actually used but here is a recreation: when importing pkcs11.h the error is thrown:

    #include "./src/lib/pkcs11/pkcs11.h"
    
    int main() {
        return 0;
    }
    SoftHSMv2 on  develop [?] via C v14.2.1-gcc via △ v3.31.6 via 🐍 v3.13.3 (.venv) via ❄️ impure (nix-shell-env)
    ➜ git rev-parse HEAD
    4f296fac1ab9461215b9edba9199f1ed2e1eb4ee
    
    SoftHSMv2 on  develop [?] via C v14.2.1-gcc via △ v3.31.6 via 🐍 v3.13.3 (.venv) via ❄️ impure (nix-shell-env)
    ➜ gcc test.c
    In file included from test.c:1:
    ./src/lib/pkcs11/pkcs11.h:984:3: error: unknown type name ‘ck_rsa_pkcs_oaep_params’
      984 |   ck_rsa_pkcs_oaep_params *oaep_params;
          |   ^~~~~~~~~~~~~~~~~~~~~~~
    
    SoftHSMv2 on  develop [?] via C v14.2.1-gcc via △ v3.31.6 via 🐍 v3.13.3 (.venv) via ❄️ impure (nix-shell-env)
    ➜ git checkout ebf6ff706a37ecb1e9249631d3818d810075b91c
    Note: switching to 'ebf6ff706a37ecb1e9249631d3818d810075b91c'.
    
    SoftHSMv2 on  HEAD (ebf6ff7) [?] via C v14.2.1-gcc via △ v3.31.6 via 🐍 v3.13.3 (.venv) via ❄️ impure (nix-shell-env)
    ➜ gcc test.c
    /nix/store/mkvc0lnnpmi604rqsjdlv1pmhr638nbd-binutils-2.44/bin/ld: skipping incompatible /nix/store/mv117y14k5jlhscg81dybk3rrlw0j4vv-glibc-2.40-66/lib/libc.so when searching for -lc
    /nix/store/mkvc0lnnpmi604rqsjdlv1pmhr638nbd-binutils-2.44/bin/ld: skipping incompatible /nix/store/mv117y14k5jlhscg81dybk3rrlw0j4vv-glibc-2.40-66/lib/libc.so when searching for -lc
    /nix/store/mkvc0lnnpmi604rqsjdlv1pmhr638nbd-binutils-2.44/bin/ld: skipping incompatible /nix/store/mv117y14k5jlhscg81dybk3rrlw0j4vv-glibc-2.40-66/lib/libc.so when searching for -lc
    /nix/store/mkvc0lnnpmi604rqsjdlv1pmhr638nbd-binutils-2.44/bin/ld: skipping incompatible /nix/store/mv117y14k5jlhscg81dybk3rrlw0j4vv-glibc-2.40-66/lib/libc.so when searching for -lc
    /nix/store/mkvc0lnnpmi604rqsjdlv1pmhr638nbd-binutils-2.44/bin/ld: skipping incompatible /nix/store/mv117y14k5jlhscg81dybk3rrlw0j4vv-glibc-2.40-66/lib/libc.so when searching for -lc
  3. ruiliio commented on Aug 20, 2025

    @ruiliio
    Contributor

    Thanks, I was able to reproduce, fix is on #811

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions