public static X509Certificate [ ] copyCertChain ( X509Certificate [ ] certChain ) { if ( certChain == null ) { return null ; } final int LEN = certChain . length ; if ( LEN == 0 ) { return new X509Certificate [ LEN ] ; } X509Certificate [ ] newCertChain = new X509Certificate [ LEN ] ; System . arraycopy ( certChain , 0 , newCertChain , 0 , LEN ) ; return newCertChain ; }
Create a copy of the specified cert array .