diff --git a/src/share/classes/sun/security/tools/TimestampedSigner.java b/src/share/classes/sun/security/tools/TimestampedSigner.java index efdc3c0c83b8b845bd975a03e6dc9816e3a47db3..549ed8ea21004a8073b2992e0dc96f9983948ae3 100644 --- a/src/share/classes/sun/security/tools/TimestampedSigner.java +++ b/src/share/classes/sun/security/tools/TimestampedSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2007-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -375,7 +375,8 @@ public final class TimestampedSigner extends ContentSigner { } if (!isSigner) { keyPurposes = cert.getExtendedKeyUsage(); - if (! keyPurposes.contains(KP_TIMESTAMPING_OID)) { + if (keyPurposes == null || + ! keyPurposes.contains(KP_TIMESTAMPING_OID)) { throw new CertificateException( "Certificate is not valid for timestamping"); }