Permalink
Browse files

Make sure cert id is unique even if the pem is the same.

  • Loading branch information...
2 parents 70e6d54 + 8b28c28 commit 739f29798c90ae5632660627ab0a5d3b02adb839 Ye Wen committed Aug 19, 2011
@@ -73,7 +73,7 @@ public static CertificateEntity newInstanceWithId( final String id ) {
@PrePersist
public void generateOnCommit() {
if( this.certificateId == null ) {
- this.certificateId = Crypto.getHmacProvider( ).generateQueryId( this.pem );
+ this.certificateId = Crypto.getHmacProvider( ).generateQueryId( this.pem + Double.toHexString( Math.random( ) ) );
}
}

0 comments on commit 739f297

Please sign in to comment.