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

Implemented ExtractSerialNumberFromX509Cert() Method #26485

Conversation

emargolis
Copy link
Contributor

Fixes #26425

Note that the actual implementation is different from what is described in #26425. According to #26425 the output was expected to point to the Serial Number content in the certificate. Because of some crypto libraries unique implementations of the certificate parsing logic this implementation copies Serial Number into the buffer provided by the caller.

@github-actions
Copy link

PR #26485: Size comparison from c0a10eb to 9edd06d

Increases (1 build for cc32xx)
platform target config section c0a10eb 9edd06d change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 101232 101240 8 0.0
.debug_frame 342080 342120 40 0.0
.debug_info 19674628 19677132 2504 0.0
.debug_line 2671903 2672225 322 0.0
.debug_loclists 1491139 1491434 295 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131828 3131968 140 0.0
Full report (1 build for cc32xx)
platform target config section c0a10eb 9edd06d change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605002 605002 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957619 957619 0 0.0
.debug_aranges 101232 101240 8 0.0
.debug_frame 342080 342120 40 0.0
.debug_info 19674628 19677132 2504 0.0
.debug_line 2671903 2672225 322 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1491139 1491434 295 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131828 3131968 140 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104314 104314 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483089 483089 0 0.0
.symtab 287232 287232 0 0.0
.text 498564 498564 0 0.0

@emargolis emargolis force-pushed the emargolis/feature/x509cert-extract-serial-number branch from 9edd06d to 3cdd5ea Compare May 11, 2023 00:26
src/crypto/CHIPCryptoPALOpenSSL.cpp Outdated Show resolved Hide resolved
@emargolis emargolis force-pushed the emargolis/feature/x509cert-extract-serial-number branch from 3cdd5ea to d66058c Compare May 11, 2023 21:32
@github-actions
Copy link

PR #26485: Size comparison from 023b023 to d66058c

Increases (1 build for cc32xx)
platform target config section 023b023 d66058c change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 101232 101240 8 0.0
.debug_frame 342080 342120 40 0.0
.debug_info 19674626 19677130 2504 0.0
.debug_line 2671903 2672225 322 0.0
.debug_loclists 1491139 1491434 295 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131828 3131968 140 0.0
Full report (1 build for cc32xx)
platform target config section 023b023 d66058c change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605002 605002 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957619 957619 0 0.0
.debug_aranges 101232 101240 8 0.0
.debug_frame 342080 342120 40 0.0
.debug_info 19674626 19677130 2504 0.0
.debug_line 2671903 2672225 322 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1491139 1491434 295 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131828 3131968 140 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104314 104314 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483089 483089 0 0.0
.symtab 287232 287232 0 0.0
.text 498564 498564 0 0.0

@emargolis emargolis force-pushed the emargolis/feature/x509cert-extract-serial-number branch from d66058c to 69f40a0 Compare May 12, 2023 05:47
@github-actions
Copy link

PR #26485: Size comparison from a3b4005 to 69f40a0

Increases (1 build for cc32xx)
platform target config section a3b4005 69f40a0 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_aranges 101232 101240 8 0.0
.debug_frame 342084 342124 40 0.0
.debug_info 19678442 19680947 2505 0.0
.debug_line 2673606 2673927 321 0.0
.debug_loclists 1491157 1491438 281 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131974 3132114 140 0.0
Full report (1 build for cc32xx)
platform target config section a3b4005 69f40a0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605018 605018 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 958615 958615 0 0.0
.debug_aranges 101232 101240 8 0.0
.debug_frame 342084 342124 40 0.0
.debug_info 19678442 19680947 2505 0.0
.debug_line 2673606 2673927 321 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1491157 1491438 281 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94412 94418 6 0.0
.debug_str 3131974 3132114 140 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104322 104322 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483172 483172 0 0.0
.symtab 287232 287232 0 0.0
.text 498572 498572 0 0.0

@andy31415 andy31415 merged commit ef7e606 into project-chip:master May 15, 2023
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ExtractSerialNumberFromX509Cert primitive in CHIPCryptoPAL.h and OpenSSL
3 participants