Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 529
    • Issues 529
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 96
    • Merge requests 96
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #2315
Closed
Open
Created Nov 27, 2020 by Cathy Almond@cathyaDeveloper

BIND 9.11.22 - 9.11.25 fails to build for AEP HSM native pkcs11

Support ticket #17347

./configure --enable-threads --enable-native-pkcs11 --with-ecdsa -with-pkcs11=/opt/Keyper/PKCS11Provider/pkcs11.so

I think it's the --enable-native-pkcs11 AND using the AEP Keyper flavour of native pkcs11 that is setting the switch so that we fail the build

The build fail is this:

pkcs11rsa_link.c: In function 'pkcs11rsa_verify':
pkcs11rsa_link.c:1081:4: error: a label can only be part of a statement and a declaration is not a statement

This is in the flavour of pkcs11rsa_verify() that is inside the else section of #ifndef PK11_RSA_PKCS_REPLACE

By my reading of /lib/isc/include/pk11/site.h, we're defining PK11_RSA_PKCS_REPLACE if we're working with an AEP pkcs11 set of libs (but not apparently for anything else).

Here's the offending bit of code in /lib/dns/pkcs11rsa_link.c (the define for 'bits' was added by issue #2037 (closed) )

		case CKA_PUBLIC_EXPONENT:
			unsigned int bits;
			INSIST(keyTemplate[6].type == attr->type);

From what I'm reading about this compiler error, the problem is that the C language standard says that labels can only be followed by statements. What we've got here is a declarations - and that's not perceived as a statement in C.

Apparently, the workaround is to add an empty statement - it's been suggested that comment after the label will do the trick (though I am not in a position to verify that) - but if yes, then this should work:

		case CKA_PUBLIC_EXPONENT:   /* Empty statement to make compiler happy */
			unsigned int bits;
			INSIST(keyTemplate[6].type == attr->type);

Please can someone look at this soonest!

Edited Nov 27, 2020 by Cathy Almond
Assignee
Assign to
Time tracking