[
https://issues.apache.org/jira/browse/CLOUDSTACK-8215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14306954#comment-14306954
]
ASF GitHub Bot commented on CLOUDSTACK-8215:
--------------------------------------------
Github user karuturi commented on the pull request:
https://github.com/apache/cloudstack/pull/71#issuecomment-73023911
Just a personal preference: using [Joda](http://www.joda.org/joda-time/)
DateTime might make it more readable :)
```
DateTime now = DateTime.now(DateTimeZone.UTC);
certGen.setNotBefore(now.minusDays(1).toDate());
certGen.setNotAfter(now.plusYears(3).toDate());
```
> SAML2 authentication provider certificate is only valid for two days
> --------------------------------------------------------------------
>
> Key: CLOUDSTACK-8215
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8215
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.5.0, 4.6.0
> Environment: Fresh 4.5 running on CentOS 6. Built from lastest sha
> (5159cbec9f7 at time of wring)
> Reporter: Erik Weber
> Labels: easyfix
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> There's something wrong with the date calculation in
> SAMLUtils.generateRandomX509Certificate().
> The result is that the certificate is only valid for ~2 days, while it
> probably should be valid for much longer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)