src/macosx/classes/apple/security/KeychainStore.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2012, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2014, Oracle and/or its affiliates. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 246,256 **** if (entry != null && entry instanceof KeyEntry) { if (((KeyEntry)entry).chain == null) { return null; } else { ! return (Certificate[])((KeyEntry)entry).chain.clone(); } } else { return null; } } --- 246,256 ---- if (entry != null && entry instanceof KeyEntry) { if (((KeyEntry)entry).chain == null) { return null; } else { ! return ((KeyEntry)entry).chain.clone(); } } else { return null; } }
*** 363,373 **** if (chain != null) { if ((chain.length > 1) && !validateChain(chain)) { throw new KeyStoreException("Certificate chain does not validate"); } ! entry.chain = (Certificate[])chain.clone(); entry.chainRefs = new long[entry.chain.length]; } String lowerAlias = alias.toLowerCase(); if (entries.get(lowerAlias) != null) { --- 363,373 ---- if (chain != null) { if ((chain.length > 1) && !validateChain(chain)) { throw new KeyStoreException("Certificate chain does not validate"); } ! entry.chain = chain.clone(); entry.chainRefs = new long[entry.chain.length]; } String lowerAlias = alias.toLowerCase(); if (entries.get(lowerAlias) != null) {
*** 427,437 **** entry.date = new Date(); if ((chain != null) && (chain.length != 0)) { ! entry.chain = (Certificate[])chain.clone(); entry.chainRefs = new long[entry.chain.length]; } String lowerAlias = alias.toLowerCase(); if (entries.get(lowerAlias) != null) { --- 427,437 ---- entry.date = new Date(); if ((chain != null) && (chain.length != 0)) { ! entry.chain = chain.clone(); entry.chainRefs = new long[entry.chain.length]; } String lowerAlias = alias.toLowerCase(); if (entries.get(lowerAlias) != null) {
*** 1120,1130 **** + e.getMessage()); uke.initCause(e); throw uke; } ! return ((byte[])key); } } --- 1120,1130 ---- + e.getMessage()); uke.initCause(e); throw uke; } ! return key; } }