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

PKCS Pad: public API to do PKCS padding #8502

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SparkiDev
Copy link
Contributor

@SparkiDev SparkiDev commented Feb 25, 2025

Description

PKCS padding adds length of padding as repeated padding byte.
Use the new function in all places.

Fixes zd#19391

Testing

./configure --enable-pkcs7
make test

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@SparkiDev SparkiDev self-assigned this Feb 25, 2025
@SparkiDev
Copy link
Contributor Author

retest this please

@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Feb 25, 2025
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Love this cleanup

@dgarske dgarske self-assigned this Feb 25, 2025
Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Simple cast issues.

@dgarske dgarske assigned SparkiDev and unassigned dgarske Feb 25, 2025
PKCS padding adds length of padding as repeated padding byte.
Use the new function in all places.
@dgarske
Copy link
Contributor

dgarske commented Feb 25, 2025

Retest this please: "Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception:"

}

return (int)(inSz + padSz);
return wc_PkcsPad(out, inSz, blockSz);
Copy link
Contributor

Choose a reason for hiding this comment

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

    autogen.sh ae5f9b0906...   real 0m4.783s  user 0m3.338s  sys 0m0.490s
    configure...   real 0m10.600s  user 0m5.092s  sys 0m6.295s
    build...wolfcrypt/src/pkcs7.c: In function ‘wc_PKCS7_PadData’:
wolfcrypt/src/pkcs7.c:8730:12: error: conversion to ‘int’ from ‘word32’ {aka ‘unsigned int’} may change the sign of the result [-Werror=sign-conversion]
 8730 |     return wc_PkcsPad(out, inSz, blockSz);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:8374: wolfcrypt/src/src_libwolfssl_la-pkcs7.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:9421: all-recursive] Error 1
make: *** [Makefile:5498: all] Error 2
   real 0m3.157s  user 0m21.647s  sys 0m1.691s
    allcryptonly-gcc-c89 fail_build
    failed config: '--srcdir' '.' '--disable-jobserver' '--enable-option-checking=fatal' '--enable-c89' '--enable-all' '--disable-all-osp' '--disable-opensslall' '--enable-cryptonly' '--enable-testcert' '--enable-acert' '--disable-examples' '--disable-crypttests' '--disable-benchmark' 'CC=gcc' 'CFLAGS=-std=c89 -pedantic -Wvla -Wdeclaration-after-statement -Wconversion -DWOLF_NO_VARIADIC_MACROS -DXSNPRINTF=snprintf -D_ISOC99_SOURCE=1'
exiting with status 2
results for ae5f9b0906:
failed: allcryptonly-gcc-c89```

@SparkiDev SparkiDev assigned dgarske and unassigned SparkiDev Feb 26, 2025
@SparkiDev SparkiDev removed the request for review from wolfSSL-Bot February 26, 2025 01:49
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.

3 participants