Skip to content

Large values for openssl_csr_sign() $days overflow #16433

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$dn = array();
$csr = openssl_csr_new($dn, $privkey, $args);
var_dump(openssl_csr_sign($csr, null, $privkey, PHP_INT_MAX, $args));

Resulted in this output:

/php-src/ext/openssl/openssl.c:3352:56: runtime error: signed integer overflow: 86400 * 9223372036854775807 cannot be represented in type 'long'

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions