static int mergeInhibitAnyPolicy ( int inhibitAnyPolicy , X509CertImpl currCert ) throws CertPathValidatorException { if ( ( inhibitAnyPolicy > 0 ) && ! X509CertImpl . isSelfIssued ( currCert ) ) { inhibitAnyPolicy -- ; } try { InhibitAnyPolicyExtension inhAnyPolExt = ( InhibitAnyPolicyExtension ) currCert . getExtension ( InhibitAnyPolicy_Id ) ; if ( inhAnyPolExt == null ) return inhibitAnyPolicy ; int skipCerts = inhAnyPolExt . get ( InhibitAnyPolicyExtension . SKIP_CERTS ) . intValue ( ) ; if ( debug != null ) debug . println ( "PolicyChecker.mergeInhibitAnyPolicy() " + "skipCerts Index from cert = " + skipCerts ) ; if ( skipCerts != - 1 ) { if ( skipCerts < inhibitAnyPolicy ) { inhibitAnyPolicy = skipCerts ; } } } catch ( IOException e ) { if ( debug != null ) { debug . println ( "PolicyChecker.mergeInhibitAnyPolicy " + "unexpected exception" ) ; e . printStackTrace ( ) ; } throw new CertPathValidatorException ( e ) ; } return inhibitAnyPolicy ; }
Merges the specified inhibitAnyPolicy value with the SkipCerts value of the InhibitAnyPolicy extension obtained from the certificate .