src/main/java/org/hyperledger/fabric/sdk/Channel.java
/**
     * load the peer organizations CA certificates into the channel's trust store so that we
     * can verify signatures from peer messages
     *
     * @throws InvalidArgumentException
     * @throws CryptoException
     */
load the peer organizations CA certificates into the channel's trust store so that we
can verify signatures from peer messages


load the peer organizations CA certificates into the channel ' s trust store so that we can verify signatures from peer messages
protected void loadCACertificates() throws InvalidArgumentException, CryptoException {
        logger.debug(format("Channel %s loadCACertificates", name));
        if (msps == null || msps.isEmpty()) {
            throw new InvalidArgumentException("Unable to load CA certificates. Channel " + name + " does not have any MSPs.");
        }
        List<byte[]> certList;
        for (MSP msp : msps.values()) {
            logger.debug("loading certificates for MSP : " + msp.getID());
            certList = Arrays.asList(msp.getRootCerts());
            if (certList.size() > 0) {
                client.getCryptoSuite().loadCACertificatesAsBytes(certList);
            }
            certList = Arrays.asList(msp.getIntermediateCerts());
            if (certList.size() > 0) {
                client.getCryptoSuite().loadCACertificatesAsBytes(certList);
            }
        }
        logger.debug(format("Channel %s loadCACertificates completed ", name));
    }
protected void loadCACertificates ( ) throws InvalidArgumentException , CryptoException { logger . debug ( format ( "Channel %s loadCACertificates" , name ) ) ; if ( msps == null || msps . isEmpty ( ) ) { throw new InvalidArgumentException ( "Unable to load CA certificates. Channel " + name + " does not have any MSPs." ) ; } List < byte [ ] > certList ; for ( MSP msp : msps . values ( ) ) { logger . debug ( "loading certificates for MSP : " + msp . getID ( ) ) ; certList = Arrays . asList ( msp . getRootCerts ( ) ) ; if ( certList . size ( ) > 0 ) { client . getCryptoSuite ( ) . loadCACertificatesAsBytes ( certList ) ; } certList = Arrays . asList ( msp . getIntermediateCerts ( ) ) ; if ( certList . size ( ) > 0 ) { client . getCryptoSuite ( ) . loadCACertificatesAsBytes ( certList ) ; } } logger . debug ( format ( "Channel %s loadCACertificates completed " , name ) ) ; }
load the peer organizations CA certificates into the channel's trust store so that we
 can verify signatures from peer messages
load the peer organizations CA certificates into the channel ' s trust store so that we can verify signatures from peer messages
// not adding admin certs. Admin certs should be signed by the CA