public boolean verifyRFC822SpecialCase ( X500Name subject ) throws IOException { for ( AVA ava : subject . allAvas ( ) ) { ObjectIdentifier attrOID = ava . getObjectIdentifier ( ) ; if ( attrOID . equals ( ( Object ) PKCS9Attribute . EMAIL_ADDRESS_OID ) ) { String attrValue = ava . getValueString ( ) ; if ( attrValue != null ) { RFC822Name emailName ; try { emailName = new RFC822Name ( attrValue ) ; } catch ( IOException ioe ) { continue ; } if ( ! verify ( emailName ) ) { return ( false ) ; } } } } return true ; }
Perform the RFC 822 special case check . We have a certificate that does not contain any subject alternative names . Check that any EMAILADDRESS attributes in its subject name conform to these NameConstraints .