/** * Construct a UserNotice policy qualifier. * * @param organizationText the organization text, or {@code null} to skip the NoticeReference section * @param noticeNumbers the notice numbers (only used if organization text is given) * @param explicitText explicit text for the notice, or {@code null} to skip the DisplayText section * @return the constructed policy qualifier */ public static PolicyQualifier userNoticeQualifier(String organizationText, BigInteger[] noticeNumbers, String explicitText) { return new PolicyQualifier(X500.OID_QT_UNOTICE, encoder -> { encoder.startSequence(); // userNotice if (organizationText != null) { encoder.startSequence(); // noticeRef encoder.encodeUTF8String(organizationText); encoder.startSequence(); // noticeNumbers if (noticeNumbers != null) for (BigInteger noticeNumber : noticeNumbers) { encoder.encodeInteger(noticeNumber); } encoder.endSequence(); // noticeNumbers encoder.endSequence(); // noticeRef } if (explicitText != null) { encoder.encodeUTF8String(explicitText); } encoder.endSequence(); // UserNotice }); }
/** * Construct a UserNotice policy qualifier. * * @param organizationText the organization text, or {@code null} to skip the NoticeReference section * @param noticeNumbers the notice numbers (only used if organization text is given) * @param explicitText explicit text for the notice, or {@code null} to skip the DisplayText section * @return the constructed policy qualifier */ public static PolicyQualifier userNoticeQualifier(String organizationText, BigInteger[] noticeNumbers, String explicitText) { return new PolicyQualifier(X500.OID_QT_UNOTICE, encoder -> { encoder.startSequence(); // userNotice if (organizationText != null) { encoder.startSequence(); // noticeRef encoder.encodeUTF8String(organizationText); encoder.startSequence(); // noticeNumbers if (noticeNumbers != null) for (BigInteger noticeNumber : noticeNumbers) { encoder.encodeInteger(noticeNumber); } encoder.endSequence(); // noticeNumbers encoder.endSequence(); // noticeRef } if (explicitText != null) { encoder.encodeUTF8String(explicitText); } encoder.endSequence(); // UserNotice }); }
/** * Construct a UserNotice policy qualifier. * * @param organizationText the organization text, or {@code null} to skip the NoticeReference section * @param noticeNumbers the notice numbers (only used if organization text is given) * @param explicitText explicit text for the notice, or {@code null} to skip the DisplayText section * @return the constructed policy qualifier */ public static PolicyQualifier userNoticeQualifier(String organizationText, BigInteger[] noticeNumbers, String explicitText) { return new PolicyQualifier(X500.OID_QT_UNOTICE, encoder -> { encoder.startSequence(); // userNotice if (organizationText != null) { encoder.startSequence(); // noticeRef encoder.encodeUTF8String(organizationText); encoder.startSequence(); // noticeNumbers if (noticeNumbers != null) for (BigInteger noticeNumber : noticeNumbers) { encoder.encodeInteger(noticeNumber); } encoder.endSequence(); // noticeNumbers encoder.endSequence(); // noticeRef } if (explicitText != null) { encoder.encodeUTF8String(explicitText); } encoder.endSequence(); // UserNotice }); }
/** * Construct a CPS policy qualifier. * * @param uri the CPS URI (must not be {@code null}) * @return the constructed policy qualifier */ public static PolicyQualifier cpsQualifier(String uri) { return new PolicyQualifier(X500.OID_QT_CPS, encoder -> encoder.encodeIA5String(uri)); } }
/** * Construct a CPS policy qualifier. * * @param uri the CPS URI (must not be {@code null}) * @return the constructed policy qualifier */ public static PolicyQualifier cpsQualifier(String uri) { return new PolicyQualifier(X500.OID_QT_CPS, encoder -> encoder.encodeIA5String(uri)); } }
/** * Construct a CPS policy qualifier. * * @param uri the CPS URI (must not be {@code null}) * @return the constructed policy qualifier */ public static PolicyQualifier cpsQualifier(String uri) { return new PolicyQualifier(X500.OID_QT_CPS, encoder -> encoder.encodeIA5String(uri)); } }
/** * Construct a UserNotice policy qualifier. * * @param organizationText the organization text, or {@code null} to skip the NoticeReference section * @param noticeNumbers the notice numbers (only used if organization text is given) * @param explicitText explicit text for the notice, or {@code null} to skip the DisplayText section * @return the constructed policy qualifier */ public static PolicyQualifier userNoticeQualifier(String organizationText, BigInteger[] noticeNumbers, String explicitText) { return new PolicyQualifier(X500.OID_QT_UNOTICE, encoder -> { encoder.startSequence(); // userNotice if (organizationText != null) { encoder.startSequence(); // noticeRef encoder.encodeUTF8String(organizationText); encoder.startSequence(); // noticeNumbers if (noticeNumbers != null) for (BigInteger noticeNumber : noticeNumbers) { encoder.encodeInteger(noticeNumber); } encoder.endSequence(); // noticeNumbers encoder.endSequence(); // noticeRef } if (explicitText != null) { encoder.encodeUTF8String(explicitText); } encoder.endSequence(); // UserNotice }); }
/** * Construct a CPS policy qualifier. * * @param uri the CPS URI (must not be {@code null}) * @return the constructed policy qualifier */ public static PolicyQualifier cpsQualifier(String uri) { return new PolicyQualifier(X500.OID_QT_CPS, encoder -> encoder.encodeIA5String(uri)); } }