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

?string $serial_hex = null #961

Closed
David-LS opened this issue Jan 21, 2025 · 2 comments · Fixed by #962
Closed

?string $serial_hex = null #961

David-LS opened this issue Jan 21, 2025 · 2 comments · Fixed by #962

Comments

@David-LS
Copy link

From manual page: https://php.net/function.openssl-csr-sign


文档上为?string $serial_hex = null
但是实际调用参数为int类型 并且受限于int最大长度限制 无法产生更长序列号的证书(参考微信支付证书序列号为40位)

@mowangjuanzi
Copy link
Member

我看了一下目前该函数的源码定义。他定义的变量类型确实是字符串类型。

zend_string *serial_hex = NULL;

Z_PARAM_STR_OR_NULL(serial_hex);

https://github.com/php/php-src/blob/master/ext/openssl/openssl.c#L3258

文档的描述是没有问题的。

@sy-records
Copy link
Member

第7个参数 ?string $serial_hex = null是8.4才添加的,文档翻译版本落后,你可能疑问的是第6个参数 int $serial = 0

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 a pull request may close this issue.

3 participants