History log of /openbsd-current/lib/libcrypto/x509/x509cset.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.22 26-Mar-2024 tb

Cosmetics, mostly removal of silly parentheses

No change in generated assembly


# 1.21 26-Mar-2024 tb

Tweak versions comment for CRLs


# 1.20 26-Mar-2024 tb

Reject setting invalid versions for certs, CRLs and CSRs

The toolkit aspect bites again. Lots of invalid CRLs and CSRs are produced
because people neither read the RFCs nor does the toolkit check anything it
is fed. Reviewers apparently also aren't capable of remembering that they
have three copy-pasted versions of the same API and that adding a version
check to one of the might suggest adding one for the other two.

This requires ruby-openssl 20240326p0 to pass

ok beck job jsing


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.19 16-Feb-2023 tb

libressl *_namespace.h: adjust *_ALIAS() to require a semicolon

LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h

fix suggested by & ok jsing


# 1.18 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.17 14-Nov-2022 beck

Hide public symbols in libcrypto/x509 .c files

ok tb@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.16 01-Nov-2021 tb

Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.

ok jsing


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.19 16-Feb-2023 tb

libressl *_namespace.h: adjust *_ALIAS() to require a semicolon

LCRYPTO_ALIAS() and LSSL_ALIAS() contained a trailing semicolon.
This does not conform to style(9), breaks editors and ctags and
(most importantly) my workflow. Fix this by neutering them with
asm("") so that -Wpedantic doesn't complain. There's precedent
in libc's namespace.h

fix suggested by & ok jsing


# 1.18 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.17 14-Nov-2022 beck

Hide public symbols in libcrypto/x509 .c files

ok tb@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.16 01-Nov-2021 tb

Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.

ok jsing


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.18 26-Nov-2022 tb

Make internal header file names consistent

Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include <ssl_locl.h> was fixed manually.

discussed with jsing,
no objection bcook


# 1.17 14-Nov-2022 beck

Hide public symbols in libcrypto/x509 .c files

ok tb@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.16 01-Nov-2021 tb

Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.

ok jsing


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.17 14-Nov-2022 beck

Hide public symbols in libcrypto/x509 .c files

ok tb@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.16 01-Nov-2021 tb

Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.

ok jsing


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.16 01-Nov-2021 tb

Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.

ok jsing


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.15 23-Oct-2021 tb

Prepare to provide X509_re_X509*_tbs()

ok beck jsing


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


# 1.14 22-Feb-2018 jsing

Provide X509_CRL_set1_lastUpdate() and X509_CRL_set1_nextUpdate().


# 1.13 22-Feb-2018 jsing

Provide X509_CRL_up_ref().


# 1.12 22-Feb-2018 jsing

Provide X509_REVOKED_get0_extensions(), X509_REVOKED_get0_revocationDate()
and X509_REVOKED_get0_serialNumber().


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-Sep-2015 jsing

s/M_ASN1_TIME_free/ASN1_TIME_free/


# 1.10 30-Sep-2015 jsing

Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also
replace some ASN1_STRING_dup() with ASN1_INTEGER_dup().

ok beck@ doug@


# 1.9 29-Jul-2015 jsing

Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generated
assembly.

ok bcook@


# 1.8 11-Jul-2014 jsing

Only import cryptlib.h in the four source files that actually need it.
Remove the openssl public includes from cryptlib.h and add a small number
of includes into the source files that actually need them. While here,
also sort/group/tidy the includes.

ok beck@ miod@


# 1.7 12-Jun-2014 deraadt

tags as requested by miod and tedu


# 1.6 20-Apr-2014 jsing

KNF.


# 1.5 18-Apr-2014 tedu

blunt force knf


# 1.4 01-Oct-2010 djm

resolve conflicts, fix local changes


# 1.3 09-Jan-2009 djm

resolve conflicts


# 1.2 29-Apr-2005 djm

resolve conflicts


# 1.1 15-May-2002 beck

branches: 1.1.1;
OpenSSL 0.9.7 stable 2002 05 08 merge