jdk/src/share/classes/sun/security/provider/certpath/Vertex.java
changeset 10336 0bb1999251f8
parent 5506 202f599c92aa
child 12860 9ffbd4e43413
equal deleted inserted replaced
10335:3c7eda3ab2f5 10336:0bb1999251f8
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   169         }
   169         }
   170         SubjectKeyIdentifierExtension sKeyID = null;
   170         SubjectKeyIdentifierExtension sKeyID = null;
   171         try {
   171         try {
   172             sKeyID = x509Cert.getSubjectKeyIdentifierExtension();
   172             sKeyID = x509Cert.getSubjectKeyIdentifierExtension();
   173             if (sKeyID != null) {
   173             if (sKeyID != null) {
   174                 KeyIdentifier keyID = (KeyIdentifier)sKeyID.get(sKeyID.KEY_ID);
   174                 KeyIdentifier keyID = sKeyID.get(
       
   175                         SubjectKeyIdentifierExtension.KEY_ID);
   175                 out = out + "SubjKeyID:  " + keyID.toString();
   176                 out = out + "SubjKeyID:  " + keyID.toString();
   176             }
   177             }
   177         } catch (Exception e) {
   178         } catch (Exception e) {
   178             if (debug != null) {
   179             if (debug != null) {
   179                 debug.println("Vertex.certToString() unexpected exception");
   180                 debug.println("Vertex.certToString() unexpected exception");
   182         }
   183         }
   183         AuthorityKeyIdentifierExtension aKeyID = null;
   184         AuthorityKeyIdentifierExtension aKeyID = null;
   184         try {
   185         try {
   185             aKeyID = x509Cert.getAuthorityKeyIdentifierExtension();
   186             aKeyID = x509Cert.getAuthorityKeyIdentifierExtension();
   186             if (aKeyID != null) {
   187             if (aKeyID != null) {
   187                 KeyIdentifier keyID = (KeyIdentifier)aKeyID.get(aKeyID.KEY_ID);
   188                 KeyIdentifier keyID = (KeyIdentifier)aKeyID.get(
       
   189                         AuthorityKeyIdentifierExtension.KEY_ID);
   188                 out = out + "AuthKeyID:  " + keyID.toString();
   190                 out = out + "AuthKeyID:  " + keyID.toString();
   189             }
   191             }
   190         } catch (Exception e) {
   192         } catch (Exception e) {
   191             if (debug != null) {
   193             if (debug != null) {
   192                 debug.println("Vertex.certToString() 2 unexpected exception");
   194                 debug.println("Vertex.certToString() 2 unexpected exception");