Class TrustedListUtils
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.validationService.trustedList.TrustedListUtils
public class TrustedListUtils extends Object
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMUNITY_RULES_EXPRESSIONstatic StringDETERMINATION_APPROACH_EXPRESSIONstatic StringDISTRIBUTION_POINT_EXPRESSIONstatic StringINFORMATION_URI_EXPRESSIONstatic StringISSUE_DATE_EXPRESSIONstatic StringNEXT_UPDATE_EXPRESSIONstatic StringOPERATOR_NAME_EXPRESSIONstatic StringSCHEMA_TERRITORY_EXPRESSIONstatic StringSCHEME_NAME_EXPRESSIONstatic StringSEQUENCE_NUMBER_EXPRESSIONstatic StringTRUST_SERVICE_PROVIDER_EXPRESSIONstatic StringTSL_TYPE_EXPRESSIONstatic StringVERSION_IDENTIFIER_EXPRESSION -
Constructor Summary
Constructors Constructor Description TrustedListUtils() -
Method Summary
Modifier and Type Method Description static NodeListfindInTrustedList(String expression, Element element)static NodefindOneInTrustedList(String expression, Element element)static DocumentBuildergetDocumentBuilder()static XPathExpressiongetListIssueDateTimeExpression()static StringgetNamespaceFreePath(String path)static XPathExpressiongetNextUpdateDateTimeExpression()static XPathExpressiongetNextUpdateExpression(NamespaceContext namespaceContest)static XPathExpressiongetSchemeOperatorNameExpression()static XPathExpressiongetSchemeTerritoryExpression()static XMLGregorianCalendargetXmlCalendar(Node node)static booleanisLOTL(String type)Indica se o tipo informado representa um LOTL (list of the lists).static booleanisTrustedList(byte[] trustedList)Checa se o conteúdo assinado de um XML é uma lista confiável.static XMLSchemaErrorHandlervalidateTrustedList(byte[] trustedList)Verifica o conteúdo assinado de um XML e valida o schema para averiguar se é uma lista confiável
-
Field Details
-
VERSION_IDENTIFIER_EXPRESSION
- See Also:
- Constant Field Values
-
SEQUENCE_NUMBER_EXPRESSION
- See Also:
- Constant Field Values
-
TSL_TYPE_EXPRESSION
- See Also:
- Constant Field Values
-
OPERATOR_NAME_EXPRESSION
- See Also:
- Constant Field Values
-
SCHEME_NAME_EXPRESSION
- See Also:
- Constant Field Values
-
INFORMATION_URI_EXPRESSION
- See Also:
- Constant Field Values
-
DETERMINATION_APPROACH_EXPRESSION
- See Also:
- Constant Field Values
-
DISTRIBUTION_POINT_EXPRESSION
- See Also:
- Constant Field Values
-
SCHEMA_TERRITORY_EXPRESSION
- See Also:
- Constant Field Values
-
COMMUNITY_RULES_EXPRESSION
- See Also:
- Constant Field Values
-
NEXT_UPDATE_EXPRESSION
- See Also:
- Constant Field Values
-
ISSUE_DATE_EXPRESSION
- See Also:
- Constant Field Values
-
TRUST_SERVICE_PROVIDER_EXPRESSION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
TrustedListUtils
public TrustedListUtils()
-
-
Method Details
-
getDocumentBuilder
- Throws:
ParserConfigurationException
-
getNextUpdateExpression
public static XPathExpression getNextUpdateExpression(NamespaceContext namespaceContest) throws XPathExpressionException- Throws:
XPathExpressionException
-
getNextUpdateDateTimeExpression
- Throws:
XPathExpressionException
-
getListIssueDateTimeExpression
- Throws:
XPathExpressionException
-
getSchemeOperatorNameExpression
- Throws:
XPathExpressionException
-
getSchemeTerritoryExpression
- Throws:
XPathExpressionException
-
getXmlCalendar
- Throws:
DatatypeConfigurationException
-
getNamespaceFreePath
-
validateTrustedList
public static XMLSchemaErrorHandler validateTrustedList(byte[] trustedList) throws ParserConfigurationException, IOException, SAXExceptionVerifica o conteúdo assinado de um XML e valida o schema para averiguar se é uma lista confiável- Parameters:
trustedList- possível trustedList em bytes- Returns:
- erros de validação
- Throws:
ParserConfigurationExceptionIOExceptionSAXException
-
isTrustedList
public static boolean isTrustedList(byte[] trustedList)Checa se o conteúdo assinado de um XML é uma lista confiável.- Parameters:
trustedList- possível trustedList em bytes- Returns:
- se o conteúdo assinado é uma lista confiável
-
findOneInTrustedList
public static Node findOneInTrustedList(String expression, Element element) throws XPathExpressionException- Throws:
XPathExpressionException
-
findInTrustedList
public static NodeList findInTrustedList(String expression, Element element) throws XPathExpressionException- Throws:
XPathExpressionException
-
isLOTL
Indica se o tipo informado representa um LOTL (list of the lists).- Parameters:
type- tipo da lista.- Returns:
- valor lógico que indica se o tipo informado é uma LOTL.
-