[openssl/openssl] d339f4: Fixup demo exit status magic numbers

James Muir noreply at github.com
Thu Nov 16 13:51:06 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: d339f4070c40c30d99ba51df0231559efbb4280e
      https://github.com/openssl/openssl/commit/d339f4070c40c30d99ba51df0231559efbb4280e
  Author: slontis <shane.lontis at oracle.com>
  Date:   2023-11-16 (Thu, 16 Nov 2023)

  Changed paths:
    M demos/bio/client-arg.c
    M demos/bio/client-conf.c
    M demos/cipher/aesccm.c
    M demos/cipher/aesgcm.c
    M demos/cipher/aeskeywrap.c
    M demos/cipher/ariacbc.c
    M demos/cms/cms_comp.c
    M demos/cms/cms_ddec.c
    M demos/cms/cms_dec.c
    M demos/cms/cms_denc.c
    M demos/cms/cms_enc.c
    M demos/cms/cms_sign.c
    M demos/cms/cms_sign2.c
    M demos/cms/cms_uncomp.c
    M demos/cms/cms_ver.c
    M demos/digest/BIO_f_md.c
    M demos/digest/EVP_MD_demo.c
    M demos/digest/EVP_MD_stdin.c
    M demos/digest/EVP_MD_xof.c
    M demos/encode/ec_encode.c
    M demos/encode/rsa_encode.c
    M demos/kdf/hkdf.c
    M demos/kdf/pbkdf2.c
    M demos/kdf/scrypt.c
    M demos/keyexch/x25519.c
    M demos/mac/cmac-aes256.c
    M demos/mac/gmac.c
    M demos/mac/hmac-sha512.c
    M demos/mac/poly1305.c
    M demos/mac/siphash.c
    M demos/pkcs12/pkwrite.c
    M demos/pkey/EVP_PKEY_DSA_keygen.c
    M demos/pkey/EVP_PKEY_DSA_paramfromdata.c
    M demos/pkey/EVP_PKEY_DSA_paramgen.c
    M demos/pkey/EVP_PKEY_DSA_paramvalidate.c
    M demos/pkey/EVP_PKEY_EC_keygen.c
    M demos/pkey/EVP_PKEY_RSA_keygen.c
    M demos/signature/EVP_DSA_Signature_demo.c
    M demos/signature/EVP_EC_Signature_demo.c
    M demos/signature/rsa_pss_direct.c
    M demos/signature/rsa_pss_hash.c
    M demos/smime/smdec.c
    M demos/smime/smenc.c
    M demos/smime/smsign.c
    M demos/smime/smsign2.c
    M demos/smime/smver.c
    M demos/sslecho/main.c

  Log Message:
  -----------
  Fixup demo exit status magic numbers

The demo code is quite often block copied for new demos,
so this PR changes demos to use EXIT_SUCCESS & EXIT_FAILURE
instead of using 0 and 1.
Internal functions use the normal notation of 0 = error, 1 = success,
but the value returned by main() must use EXIT_SUCCESS and EXIT_FAILURE.

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>

(cherry picked from commit 09ff84bd2752cac649f57cfbf95b49dbce1c69ee)

Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22728)


  Commit: 83fc4bb3cbfcb8a5296470317d2c0dd22047bb90
      https://github.com/openssl/openssl/commit/83fc4bb3cbfcb8a5296470317d2c0dd22047bb90
  Author: James Muir <james at openssl.org>
  Date:   2023-11-16 (Thu, 16 Nov 2023)

  Changed paths:
    A demos/cms/Makefile
    M demos/cms/cms_dec.c
    M demos/cms/cms_enc.c
    M demos/cms/cms_sign2.c
    M demos/cms/cms_ver.c

  Log Message:
  -----------
  cms demos: print signingTime attributes

Add a makefile for the cms demos, and add a routine to cms_ver.c to
print any signingTime attributes from the CMS_ContentInfo object.
This provides an example that could be extended if an application
wants to examine the purported signing times.

Part of #8026

Testing:

  $ cd demos/cms
  $ make test

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>

(cherry picked from commit 9257a89b6f25dfa5aeee7114baec8ea992fcf5e5)

Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22728)


Compare: https://github.com/openssl/openssl/compare/530672c80b4e...83fc4bb3cbfc


More information about the openssl-commits mailing list