From 92e3489d7227409c9c2f3e5bc5aba107a10f9e62 Mon Sep 17 00:00:00 2001 From: divious1 Date: Tue, 26 Nov 2019 15:03:09 -0500 Subject: [PATCH 01/15] remove escu next steps and AR actions --- bin/generate.py | 4 - bin/jinja2_templates/savedsearches.j2 | 2 - package/README/savedsearches.conf.example | 4 +- .../alert_actions_base.py | 211 - .../bin/da_ess_contentupdate/cim_actions.py | 508 -- .../cloudconnectlib/__init__.py | 10 - .../cloudconnectlib/client.py | 77 - .../cloudconnectlib/common/__init__.py | 0 .../cloudconnectlib/common/lib_util.py | 54 - .../cloudconnectlib/common/log.py | 32 - .../cloudconnectlib/common/util.py | 48 - .../cloudconnectlib/configuration/__init__.py | 1 - .../cloudconnectlib/configuration/loader.py | 300 - .../configuration/schema_1_0_0.json | 344 - .../cloudconnectlib/core/__init__.py | 2 - .../core/cacerts/ca_certs_locater.py | 130 - .../cloudconnectlib/core/defaults.py | 20 - .../cloudconnectlib/core/engine.py | 326 - .../cloudconnectlib/core/exceptions.py | 27 - .../cloudconnectlib/core/ext.py | 336 - .../cloudconnectlib/core/http.py | 234 - .../cloudconnectlib/core/models.py | 277 - .../cloudconnectlib/core/pipemgr.py | 14 - .../cloudconnectlib/core/template.py | 20 - .../splunktacollectorlib/__init__.py | 0 .../cloud_connect_mod_input.py | 71 - .../splunktacollectorlib/common/__init__.py | 52 - .../splunktacollectorlib/common/log.py | 49 - .../splunktacollectorlib/common/rwlock.py | 71 - .../common/schema_meta.py | 7 - .../splunktacollectorlib/config.py | 367 - .../data_collection/__init__.py | 1 - .../data_collection/ta_checkpoint_manager.py | 147 - .../data_collection/ta_config.py | 155 - .../data_collection/ta_consts.py | 54 - .../data_collection/ta_data_client.py | 84 - .../data_collection/ta_data_collector.py | 144 - .../data_collection/ta_data_loader.py | 168 - .../data_collection/ta_helper.py | 154 - .../data_collection/ta_mod_input.py | 272 - .../splunk_ta_import_declare.py | 17 - .../ta_cloud_connect_client.py | 41 - .../cloudconnectlib/splunktalib/__init__.py | 2 - .../splunktalib/common/__init__.py | 0 .../splunktalib/common/consts.py | 1 - .../cloudconnectlib/splunktalib/common/log.py | 137 - .../splunktalib/common/pattern.py | 37 - .../splunktalib/common/util.py | 108 - .../splunktalib/common/xml_dom_parser.py | 47 - .../splunktalib/concurrent/__init__.py | 0 .../concurrent/concurrent_executor.py | 88 - .../splunktalib/concurrent/process_pool.py | 63 - .../splunktalib/concurrent/thread_pool.py | 344 - .../splunktalib/conf_manager/__init__.py | 0 .../conf_manager/conf_endpoints.py | 142 - .../splunktalib/conf_manager/conf_manager.py | 225 - .../conf_manager/data_input_endpoints.py | 152 - .../conf_manager/knowledge_objects.py | 36 - .../conf_manager/property_endpoints.py | 78 - .../splunktalib/conf_manager/request.py | 44 - .../conf_manager/ta_conf_manager.py | 211 - .../splunktalib/credentials.py | 337 - .../splunktalib/event_writer.py | 84 - .../splunktalib/file_monitor.py | 56 - .../cloudconnectlib/splunktalib/kv_client.py | 202 - .../cloudconnectlib/splunktalib/modinput.py | 147 - .../splunktalib/orphan_process_monitor.py | 65 - .../cloudconnectlib/splunktalib/rest.py | 122 - .../splunktalib/schedule/__init__.py | 0 .../splunktalib/schedule/job.py | 90 - .../splunktalib/schedule/scheduler.py | 143 - .../cloudconnectlib/splunktalib/setting.conf | 5 - .../splunktalib/splunk_cluster.py | 53 - .../splunktalib/splunk_platform.py | 104 - .../splunktalib/state_store.py | 264 - .../cloudconnectlib/splunktalib/timer.py | 60 - .../splunktalib/timer_queue.py | 138 - package/bin/da_ess_contentupdate/decorator.py | 414 - .../functools32/__init__.py | 1 - .../functools32/_dummy_thread32.py | 158 - .../functools32/functools32.py | 423 - .../functools32/reprlib32.py | 157 - .../da_ess_contentupdate/httplib2/__init__.py | 1696 ---- .../da_ess_contentupdate/httplib2/cacerts.txt | 2183 ----- .../da_ess_contentupdate/httplib2/iri2uri.py | 110 - .../da_ess_contentupdate/httplib2/socks.py | 438 - .../da_ess_contentupdate/jinja2/__init__.py | 83 - .../da_ess_contentupdate/jinja2/_compat.py | 105 - .../jinja2/_identifier.py | 2 - .../jinja2/asyncfilters.py | 146 - .../jinja2/asyncsupport.py | 256 - .../da_ess_contentupdate/jinja2/bccache.py | 361 - .../da_ess_contentupdate/jinja2/compiler.py | 1721 ---- .../da_ess_contentupdate/jinja2/constants.py | 32 - .../bin/da_ess_contentupdate/jinja2/debug.py | 378 - .../da_ess_contentupdate/jinja2/defaults.py | 56 - .../jinja2/environment.py | 1276 --- .../da_ess_contentupdate/jinja2/exceptions.py | 146 - .../bin/da_ess_contentupdate/jinja2/ext.py | 627 -- .../da_ess_contentupdate/jinja2/filters.py | 1190 --- .../da_ess_contentupdate/jinja2/idtracking.py | 286 - .../bin/da_ess_contentupdate/jinja2/lexer.py | 739 -- .../da_ess_contentupdate/jinja2/loaders.py | 481 -- .../bin/da_ess_contentupdate/jinja2/meta.py | 106 - .../jinja2/nativetypes.py | 220 - .../bin/da_ess_contentupdate/jinja2/nodes.py | 999 --- .../da_ess_contentupdate/jinja2/optimizer.py | 49 - .../bin/da_ess_contentupdate/jinja2/parser.py | 903 -- .../da_ess_contentupdate/jinja2/runtime.py | 808 -- .../da_ess_contentupdate/jinja2/sandbox.py | 488 -- .../bin/da_ess_contentupdate/jinja2/tests.py | 174 - .../bin/da_ess_contentupdate/jinja2/utils.py | 642 -- .../da_ess_contentupdate/jinja2/visitor.py | 87 - .../bin/da_ess_contentupdate/jsl/__init__.py | 22 - .../jsl/_compat/__init__.py | 80 - .../jsl/_compat/ordereddict.py | 127 - .../jsl/_compat/prepareable.py | 42 - .../bin/da_ess_contentupdate/jsl/document.py | 419 - .../da_ess_contentupdate/jsl/exceptions.py | 151 - .../jsl/fields/__init__.py | 5 - .../da_ess_contentupdate/jsl/fields/base.py | 263 - .../jsl/fields/compound.py | 578 -- .../jsl/fields/primitive.py | 161 - .../da_ess_contentupdate/jsl/fields/util.py | 24 - .../bin/da_ess_contentupdate/jsl/registry.py | 31 - .../jsl/resolutionscope.py | 71 - package/bin/da_ess_contentupdate/jsl/roles.py | 230 - .../jsonpath_rw/__init__.py | 4 - .../jsonpath_rw/bin/__init__.py | 0 .../jsonpath_rw/bin/jsonpath.py | 71 - .../jsonpath_rw/jsonpath.py | 510 -- .../da_ess_contentupdate/jsonpath_rw/lexer.py | 171 - .../jsonpath_rw/parser.py | 187 - .../jsonschema/__init__.py | 24 - .../jsonschema/__main__.py | 2 - .../jsonschema/_format.py | 240 - .../jsonschema/_reflect.py | 155 - .../da_ess_contentupdate/jsonschema/_utils.py | 213 - .../jsonschema/_validators.py | 366 - .../jsonschema/_version.py | 5 - .../da_ess_contentupdate/jsonschema/cli.py | 72 - .../da_ess_contentupdate/jsonschema/compat.py | 60 - .../jsonschema/exceptions.py | 276 - .../jsonschema/schemas/draft3.json | 201 - .../jsonschema/schemas/draft4.json | 224 - .../jsonschema/tests/__init__.py | 0 .../jsonschema/tests/compat.py | 15 - .../jsonschema/tests/test_cli.py | 110 - .../jsonschema/tests/test_exceptions.py | 386 - .../jsonschema/tests/test_format.py | 63 - .../tests/test_jsonschema_test_suite.py | 290 - .../jsonschema/tests/test_validators.py | 908 -- .../jsonschema/validators.py | 478 -- .../da_ess_contentupdate/logging_helper.py | 5 - .../bin/da_ess_contentupdate/mako/__init__.py | 8 - .../da_ess_contentupdate/mako/_ast_util.py | 851 -- package/bin/da_ess_contentupdate/mako/ast.py | 191 - .../bin/da_ess_contentupdate/mako/cache.py | 240 - package/bin/da_ess_contentupdate/mako/cmd.py | 67 - .../bin/da_ess_contentupdate/mako/codegen.py | 1255 --- .../bin/da_ess_contentupdate/mako/compat.py | 201 - .../da_ess_contentupdate/mako/exceptions.py | 394 - .../da_ess_contentupdate/mako/ext/__init__.py | 0 .../mako/ext/autohandler.py | 68 - .../mako/ext/babelplugin.py | 50 - .../mako/ext/beaker_cache.py | 76 - .../da_ess_contentupdate/mako/ext/extract.py | 108 - .../mako/ext/linguaplugin.py | 43 - .../mako/ext/preprocessors.py | 20 - .../mako/ext/pygmentplugin.py | 127 - .../mako/ext/turbogears.py | 58 - .../bin/da_ess_contentupdate/mako/filters.py | 209 - .../bin/da_ess_contentupdate/mako/lexer.py | 449 - .../bin/da_ess_contentupdate/mako/lookup.py | 367 - .../da_ess_contentupdate/mako/parsetree.py | 616 -- .../bin/da_ess_contentupdate/mako/pygen.py | 303 - .../bin/da_ess_contentupdate/mako/pyparser.py | 233 - .../bin/da_ess_contentupdate/mako/runtime.py | 909 --- .../bin/da_ess_contentupdate/mako/template.py | 726 -- package/bin/da_ess_contentupdate/mako/util.py | 382 - .../markupsafe/__init__.py | 298 - .../markupsafe/_compat.py | 26 - .../markupsafe/_constants.py | 267 - .../markupsafe/_native.py | 46 - .../markupsafe/_speedups.c | 239 - .../da_ess_contentupdate/markupsafe/tests.py | 179 - .../modalert_escu_contextualize_helper.py | 1 - .../modalert_escu_investigate_helper.py | 159 - .../modinput_wrapper/__init__.py | 0 .../modinput_wrapper/base_modinput.py | 547 -- .../da_ess_contentupdate/munch/__init__.py | 411 - .../munch/python3_compat.py | 22 - .../bin/da_ess_contentupdate/ply/__init__.py | 5 - package/bin/da_ess_contentupdate/ply/cpp.py | 918 --- .../bin/da_ess_contentupdate/ply/ctokens.py | 133 - package/bin/da_ess_contentupdate/ply/lex.py | 1100 --- package/bin/da_ess_contentupdate/ply/yacc.py | 3494 -------- package/bin/da_ess_contentupdate/ply/ygen.py | 74 - .../da_ess_contentupdate/requests/__init__.py | 131 - .../requests/__version__.py | 14 - .../requests/_internal_utils.py | 42 - .../da_ess_contentupdate/requests/adapters.py | 533 -- .../bin/da_ess_contentupdate/requests/api.py | 158 - .../bin/da_ess_contentupdate/requests/auth.py | 305 - .../da_ess_contentupdate/requests/cacert.pem | 5689 ------------- .../requests/certifi/__init__.py | 3 - .../requests/certifi/__main__.py | 2 - .../requests/certifi/cacert.pem | 4558 ----------- .../requests/certifi/core.py | 15 - .../da_ess_contentupdate/requests/certs.py | 18 - .../requests/chardet/__init__.py | 39 - .../requests/chardet/big5freq.py | 386 - .../requests/chardet/big5prober.py | 47 - .../requests/chardet/chardistribution.py | 233 - .../requests/chardet/charsetgroupprober.py | 106 - .../requests/chardet/charsetprober.py | 145 - .../requests/chardet/cli/__init__.py | 1 - .../requests/chardet/cli/chardetect.py | 85 - .../requests/chardet/codingstatemachine.py | 88 - .../requests/chardet/compat.py | 34 - .../requests/chardet/cp949prober.py | 49 - .../requests/chardet/enums.py | 76 - .../requests/chardet/escprober.py | 101 - .../requests/chardet/escsm.py | 246 - .../requests/chardet/eucjpprober.py | 92 - .../requests/chardet/euckrfreq.py | 195 - .../requests/chardet/euckrprober.py | 47 - .../requests/chardet/euctwfreq.py | 387 - .../requests/chardet/euctwprober.py | 46 - .../requests/chardet/gb2312freq.py | 283 - .../requests/chardet/gb2312prober.py | 46 - .../requests/chardet/hebrewprober.py | 292 - .../requests/chardet/jisfreq.py | 325 - .../requests/chardet/jpcntx.py | 233 - .../requests/chardet/langbulgarianmodel.py | 228 - .../requests/chardet/langcyrillicmodel.py | 333 - .../requests/chardet/langgreekmodel.py | 225 - .../requests/chardet/langhebrewmodel.py | 200 - .../requests/chardet/langhungarianmodel.py | 225 - .../requests/chardet/langthaimodel.py | 199 - .../requests/chardet/langturkishmodel.py | 193 - .../requests/chardet/latin1prober.py | 145 - .../requests/chardet/mbcharsetprober.py | 91 - .../requests/chardet/mbcsgroupprober.py | 54 - .../requests/chardet/mbcssm.py | 572 -- .../requests/chardet/sbcharsetprober.py | 132 - .../requests/chardet/sbcsgroupprober.py | 73 - .../requests/chardet/sjisprober.py | 92 - .../requests/chardet/universaldetector.py | 286 - .../requests/chardet/utf8prober.py | 82 - .../requests/chardet/version.py | 9 - .../da_ess_contentupdate/requests/compat.py | 70 - .../da_ess_contentupdate/requests/cookies.py | 549 -- .../requests/exceptions.py | 126 - .../bin/da_ess_contentupdate/requests/help.py | 119 - .../da_ess_contentupdate/requests/hooks.py | 34 - .../requests/idna/__init__.py | 1 - .../requests/idna/codec.py | 118 - .../requests/idna/compat.py | 12 - .../requests/idna/core.py | 387 - .../requests/idna/idnadata.py | 1584 ---- .../requests/idna/intranges.py | 46 - .../requests/idna/uts46data.py | 7267 ----------------- .../da_ess_contentupdate/requests/models.py | 953 --- .../da_ess_contentupdate/requests/packages.py | 14 - .../requests/packages/__init__.py | 42 - .../requests/packages/chardet/__init__.py | 39 - .../requests/packages/chardet/big5freq.py | 386 - .../requests/packages/chardet/big5prober.py | 47 - .../packages/chardet/chardistribution.py | 233 - .../packages/chardet/charsetgroupprober.py | 106 - .../packages/chardet/charsetprober.py | 145 - .../requests/packages/chardet/cli/__init__.py | 1 - .../packages/chardet/cli/chardetect.py | 85 - .../packages/chardet/codingstatemachine.py | 88 - .../requests/packages/chardet/compat.py | 34 - .../requests/packages/chardet/cp949prober.py | 49 - .../requests/packages/chardet/enums.py | 76 - .../requests/packages/chardet/escprober.py | 101 - .../requests/packages/chardet/escsm.py | 246 - .../requests/packages/chardet/eucjpprober.py | 92 - .../requests/packages/chardet/euckrfreq.py | 195 - .../requests/packages/chardet/euckrprober.py | 47 - .../requests/packages/chardet/euctwfreq.py | 387 - .../requests/packages/chardet/euctwprober.py | 46 - .../requests/packages/chardet/gb2312freq.py | 283 - .../requests/packages/chardet/gb2312prober.py | 46 - .../requests/packages/chardet/hebrewprober.py | 292 - .../requests/packages/chardet/jisfreq.py | 325 - .../requests/packages/chardet/jpcntx.py | 233 - .../packages/chardet/langbulgarianmodel.py | 228 - .../packages/chardet/langcyrillicmodel.py | 333 - .../packages/chardet/langgreekmodel.py | 225 - .../packages/chardet/langhebrewmodel.py | 200 - .../packages/chardet/langhungarianmodel.py | 225 - .../packages/chardet/langthaimodel.py | 199 - .../packages/chardet/langturkishmodel.py | 193 - .../requests/packages/chardet/latin1prober.py | 145 - .../packages/chardet/mbcharsetprober.py | 91 - .../packages/chardet/mbcsgroupprober.py | 54 - .../requests/packages/chardet/mbcssm.py | 572 -- .../packages/chardet/sbcharsetprober.py | 132 - .../packages/chardet/sbcsgroupprober.py | 73 - .../requests/packages/chardet/sjisprober.py | 92 - .../packages/chardet/universaldetector.py | 286 - .../requests/packages/chardet/utf8prober.py | 82 - .../requests/packages/chardet/version.py | 9 - .../requests/packages/idna/__init__.py | 1 - .../requests/packages/idna/codec.py | 118 - .../requests/packages/idna/compat.py | 12 - .../requests/packages/idna/core.py | 387 - .../requests/packages/idna/idnadata.py | 1584 ---- .../requests/packages/idna/intranges.py | 46 - .../requests/packages/idna/uts46data.py | 7267 ----------------- .../requests/packages/urllib3/__init__.py | 86 - .../requests/packages/urllib3/_collections.py | 336 - .../requests/packages/urllib3/connection.py | 448 - .../packages/urllib3/connectionpool.py | 1051 --- .../packages/urllib3/contrib/__init__.py | 0 .../urllib3/contrib/_appengine_environ.py | 36 - .../contrib/_securetransport/__init__.py | 0 .../contrib/_securetransport/bindings.py | 493 -- .../contrib/_securetransport/low_level.py | 328 - .../packages/urllib3/contrib/appengine.py | 314 - .../packages/urllib3/contrib/ntlmpool.py | 121 - .../packages/urllib3/contrib/pyopenssl.py | 498 -- .../urllib3/contrib/securetransport.py | 859 -- .../packages/urllib3/contrib/socks.py | 210 - .../requests/packages/urllib3/exceptions.py | 255 - .../requests/packages/urllib3/fields.py | 273 - .../requests/packages/urllib3/filepost.py | 98 - .../packages/urllib3/packages/__init__.py | 5 - .../urllib3/packages/backports/__init__.py | 0 .../urllib3/packages/backports/makefile.py | 52 - .../requests/packages/urllib3/packages/six.py | 1021 --- .../packages/ssl_match_hostname/__init__.py | 19 - .../ssl_match_hostname/_implementation.py | 160 - .../requests/packages/urllib3/poolmanager.py | 470 -- .../requests/packages/urllib3/request.py | 171 - .../requests/packages/urllib3/response.py | 809 -- .../packages/urllib3/util/__init__.py | 46 - .../packages/urllib3/util/connection.py | 138 - .../requests/packages/urllib3/util/queue.py | 21 - .../requests/packages/urllib3/util/request.py | 135 - .../packages/urllib3/util/response.py | 86 - .../requests/packages/urllib3/util/retry.py | 450 - .../requests/packages/urllib3/util/ssl_.py | 407 - .../requests/packages/urllib3/util/timeout.py | 258 - .../requests/packages/urllib3/util/url.py | 436 - .../requests/packages/urllib3/util/wait.py | 153 - .../da_ess_contentupdate/requests/sessions.py | 770 -- .../requests/status_codes.py | 120 - .../requests/structures.py | 103 - .../requests/urllib3/__init__.py | 86 - .../requests/urllib3/_collections.py | 336 - .../requests/urllib3/connection.py | 448 - .../requests/urllib3/connectionpool.py | 1051 --- .../requests/urllib3/contrib/__init__.py | 0 .../urllib3/contrib/_appengine_environ.py | 36 - .../contrib/_securetransport/__init__.py | 0 .../contrib/_securetransport/bindings.py | 493 -- .../contrib/_securetransport/low_level.py | 328 - .../requests/urllib3/contrib/appengine.py | 314 - .../requests/urllib3/contrib/ntlmpool.py | 121 - .../requests/urllib3/contrib/pyopenssl.py | 498 -- .../urllib3/contrib/securetransport.py | 859 -- .../requests/urllib3/contrib/socks.py | 210 - .../requests/urllib3/exceptions.py | 255 - .../requests/urllib3/fields.py | 273 - .../requests/urllib3/filepost.py | 98 - .../requests/urllib3/packages/__init__.py | 5 - .../urllib3/packages/backports/__init__.py | 0 .../urllib3/packages/backports/makefile.py | 52 - .../requests/urllib3/packages/six.py | 1021 --- .../packages/ssl_match_hostname/__init__.py | 19 - .../ssl_match_hostname/_implementation.py | 160 - .../requests/urllib3/poolmanager.py | 470 -- .../requests/urllib3/request.py | 171 - .../requests/urllib3/response.py | 809 -- .../requests/urllib3/util/__init__.py | 46 - .../requests/urllib3/util/connection.py | 138 - .../requests/urllib3/util/queue.py | 21 - .../requests/urllib3/util/request.py | 135 - .../requests/urllib3/util/response.py | 86 - .../requests/urllib3/util/retry.py | 450 - .../requests/urllib3/util/ssl_.py | 407 - .../requests/urllib3/util/timeout.py | 258 - .../requests/urllib3/util/url.py | 436 - .../requests/urllib3/util/wait.py | 153 - .../da_ess_contentupdate/requests/utils.py | 977 --- package/bin/da_ess_contentupdate/six.py | 868 -- package/bin/da_ess_contentupdate/socks.py | 802 -- .../bin/da_ess_contentupdate/sockshandler.py | 79 - .../da_ess_contentupdate/solnlib/__init__.py | 61 - .../bin/da_ess_contentupdate/solnlib/acl.py | 167 - .../solnlib/compression.py | 121 - .../solnlib/conf_manager.py | 427 - .../solnlib/credentials.py | 328 - .../solnlib/file_monitor.py | 133 - .../solnlib/hec_config.py | 196 - .../da_ess_contentupdate/solnlib/ip_math.py | 305 - .../bin/da_ess_contentupdate/solnlib/log.py | 227 - .../da_ess_contentupdate/solnlib/metadata.py | 99 - .../solnlib/modular_input/__init__.py | 41 - .../solnlib/modular_input/checkpointer.py | 289 - .../solnlib/modular_input/event.py | 225 - .../solnlib/modular_input/event_writer.py | 364 - .../solnlib/modular_input/modular_input.py | 464 -- .../da_ess_contentupdate/solnlib/net_utils.py | 133 - .../solnlib/orphan_process_monitor.py | 122 - .../solnlib/packages/__init__.py | 46 - .../solnlib/packages/requests/LICENSE | 13 - .../solnlib/packages/requests/__init__.py | 83 - .../solnlib/packages/requests/adapters.py | 453 - .../solnlib/packages/requests/api.py | 145 - .../solnlib/packages/requests/auth.py | 223 - .../solnlib/packages/requests/certs.py | 25 - .../solnlib/packages/requests/compat.py | 62 - .../solnlib/packages/requests/cookies.py | 487 -- .../solnlib/packages/requests/exceptions.py | 114 - .../solnlib/packages/requests/hooks.py | 34 - .../solnlib/packages/requests/models.py | 851 -- .../packages/requests/packages/__init__.py | 36 - .../requests/packages/chardet/__init__.py | 32 - .../requests/packages/chardet/big5freq.py | 925 --- .../requests/packages/chardet/big5prober.py | 42 - .../requests/packages/chardet/chardetect.py | 80 - .../packages/chardet/chardistribution.py | 231 - .../packages/chardet/charsetgroupprober.py | 106 - .../packages/chardet/charsetprober.py | 62 - .../packages/chardet/codingstatemachine.py | 61 - .../requests/packages/chardet/compat.py | 34 - .../requests/packages/chardet/constants.py | 39 - .../requests/packages/chardet/cp949prober.py | 44 - .../requests/packages/chardet/escprober.py | 86 - .../requests/packages/chardet/escsm.py | 242 - .../requests/packages/chardet/eucjpprober.py | 90 - .../requests/packages/chardet/euckrfreq.py | 596 -- .../requests/packages/chardet/euckrprober.py | 42 - .../requests/packages/chardet/euctwfreq.py | 428 - .../requests/packages/chardet/euctwprober.py | 41 - .../requests/packages/chardet/gb2312freq.py | 472 -- .../requests/packages/chardet/gb2312prober.py | 41 - .../requests/packages/chardet/hebrewprober.py | 283 - .../requests/packages/chardet/jisfreq.py | 569 -- .../requests/packages/chardet/jpcntx.py | 227 - .../packages/chardet/langbulgarianmodel.py | 229 - .../packages/chardet/langcyrillicmodel.py | 329 - .../packages/chardet/langgreekmodel.py | 225 - .../packages/chardet/langhebrewmodel.py | 201 - .../packages/chardet/langhungarianmodel.py | 225 - .../packages/chardet/langthaimodel.py | 200 - .../requests/packages/chardet/latin1prober.py | 139 - .../packages/chardet/mbcharsetprober.py | 86 - .../packages/chardet/mbcsgroupprober.py | 54 - .../requests/packages/chardet/mbcssm.py | 572 -- .../packages/chardet/sbcharsetprober.py | 120 - .../packages/chardet/sbcsgroupprober.py | 69 - .../requests/packages/chardet/sjisprober.py | 91 - .../packages/chardet/universaldetector.py | 170 - .../requests/packages/chardet/utf8prober.py | 76 - .../requests/packages/urllib3/__init__.py | 93 - .../requests/packages/urllib3/_collections.py | 324 - .../requests/packages/urllib3/connection.py | 288 - .../packages/urllib3/connectionpool.py | 818 -- .../packages/urllib3/contrib/__init__.py | 0 .../packages/urllib3/contrib/appengine.py | 223 - .../packages/urllib3/contrib/ntlmpool.py | 115 - .../packages/urllib3/contrib/pyopenssl.py | 310 - .../requests/packages/urllib3/exceptions.py | 201 - .../requests/packages/urllib3/fields.py | 178 - .../requests/packages/urllib3/filepost.py | 94 - .../packages/urllib3/packages/__init__.py | 5 - .../packages/urllib3/packages/ordered_dict.py | 259 - .../requests/packages/urllib3/packages/six.py | 385 - .../packages/ssl_match_hostname/__init__.py | 13 - .../ssl_match_hostname/_implementation.py | 105 - .../requests/packages/urllib3/poolmanager.py | 281 - .../requests/packages/urllib3/request.py | 151 - .../requests/packages/urllib3/response.py | 514 -- .../packages/urllib3/util/__init__.py | 44 - .../packages/urllib3/util/connection.py | 101 - .../requests/packages/urllib3/util/request.py | 72 - .../packages/urllib3/util/response.py | 74 - .../requests/packages/urllib3/util/retry.py | 286 - .../requests/packages/urllib3/util/ssl_.py | 317 - .../requests/packages/urllib3/util/timeout.py | 242 - .../requests/packages/urllib3/util/url.py | 217 - .../solnlib/packages/requests/sessions.py | 680 -- .../solnlib/packages/requests/status_codes.py | 90 - .../solnlib/packages/requests/structures.py | 104 - .../solnlib/packages/requests/utils.py | 721 -- .../solnlib/packages/schematics/LICENSE | 29 - .../solnlib/packages/schematics/__init__.py | 12 - .../solnlib/packages/schematics/common.py | 25 - .../solnlib/packages/schematics/compat.py | 71 - .../packages/schematics/contrib/__init__.py | 0 .../packages/schematics/contrib/mongo.py | 41 - .../packages/schematics/datastructures.py | 320 - .../solnlib/packages/schematics/exceptions.py | 180 - .../solnlib/packages/schematics/models.py | 421 - .../solnlib/packages/schematics/transforms.py | 547 -- .../packages/schematics/types/__init__.py | 9 - .../solnlib/packages/schematics/types/base.py | 1099 --- .../packages/schematics/types/compound.py | 399 - .../solnlib/packages/schematics/types/net.py | 249 - .../packages/schematics/types/serializable.py | 87 - .../packages/schematics/types/union.py | 93 - .../solnlib/packages/schematics/undefined.py | 53 - .../solnlib/packages/schematics/util.py | 86 - .../solnlib/packages/schematics/validate.py | 122 - .../solnlib/packages/sortedcontainers/LICENSE | 14 - .../packages/sortedcontainers/__init__.py | 52 - .../packages/sortedcontainers/sorteddict.py | 745 -- .../packages/sortedcontainers/sortedlist.py | 2483 ------ .../packages/sortedcontainers/sortedset.py | 327 - .../solnlib/packages/splunklib/__init__.py | 19 - .../solnlib/packages/splunklib/binding.py | 1373 ---- .../solnlib/packages/splunklib/client.py | 3719 --------- .../solnlib/packages/splunklib/data.py | 258 - .../splunklib/modularinput/__init__.py | 12 - .../splunklib/modularinput/argument.py | 102 - .../packages/splunklib/modularinput/event.py | 107 - .../splunklib/modularinput/event_writer.py | 84 - .../modularinput/input_definition.py | 59 - .../packages/splunklib/modularinput/scheme.py | 84 - .../packages/splunklib/modularinput/script.py | 176 - .../packages/splunklib/modularinput/utils.py | 72 - .../modularinput/validation_definition.py | 83 - .../solnlib/packages/splunklib/ordereddict.py | 128 - .../solnlib/packages/splunklib/results.py | 288 - .../splunklib/searchcommands/__init__.py | 155 - .../splunklib/searchcommands/decorators.py | 447 - .../splunklib/searchcommands/environment.py | 122 - .../searchcommands/eventing_command.py | 142 - .../searchcommands/external_search_command.py | 225 - .../searchcommands/generating_command.py | 320 - .../splunklib/searchcommands/internals.py | 786 -- .../searchcommands/reporting_command.py | 280 - .../searchcommands/search_command.py | 1103 --- .../searchcommands/streaming_command.py | 188 - .../splunklib/searchcommands/validators.py | 384 - .../da_ess_contentupdate/solnlib/pattern.py | 42 - .../solnlib/server_info.py | 230 - .../solnlib/splunk_rest_client.py | 202 - .../da_ess_contentupdate/solnlib/splunkenv.py | 276 - .../solnlib/time_parser.py | 129 - .../solnlib/timer_queue.py | 326 - .../solnlib/user_access.py | 868 -- .../bin/da_ess_contentupdate/solnlib/utils.py | 197 - .../sortedcontainers/__init__.py | 52 - .../sortedcontainers/sorteddict.py | 745 -- .../sortedcontainers/sortedlist.py | 2483 ------ .../sortedcontainers/sortedset.py | 327 - .../splunk_aoblib/__init__.py | 0 .../splunk_aoblib/rest_helper.py | 43 - .../splunk_aoblib/rest_migration.py | 215 - .../splunk_aoblib/setup_util.py | 363 - .../splunk_aoblib/utility.py | 16 - .../splunklib/__init__.py | 19 - .../da_ess_contentupdate/splunklib/binding.py | 1373 ---- .../da_ess_contentupdate/splunklib/client.py | 3719 --------- .../da_ess_contentupdate/splunklib/data.py | 258 - .../splunklib/modularinput/__init__.py | 12 - .../splunklib/modularinput/argument.py | 102 - .../splunklib/modularinput/event.py | 107 - .../splunklib/modularinput/event_writer.py | 84 - .../modularinput/input_definition.py | 59 - .../splunklib/modularinput/scheme.py | 84 - .../splunklib/modularinput/script.py | 176 - .../splunklib/modularinput/utils.py | 72 - .../modularinput/validation_definition.py | 83 - .../splunklib/ordereddict.py | 128 - .../da_ess_contentupdate/splunklib/results.py | 288 - .../splunklib/searchcommands/__init__.py | 155 - .../splunklib/searchcommands/decorators.py | 447 - .../splunklib/searchcommands/environment.py | 122 - .../searchcommands/eventing_command.py | 142 - .../searchcommands/external_search_command.py | 225 - .../searchcommands/generating_command.py | 320 - .../splunklib/searchcommands/internals.py | 786 -- .../searchcommands/reporting_command.py | 280 - .../searchcommands/search_command.py | 1101 --- .../searchcommands/streaming_command.py | 188 - .../splunklib/searchcommands/validators.py | 384 - .../splunktaucclib/__init__.py | 2 - .../splunktaucclib/global_config/__init__.py | 72 - .../global_config/configuration.py | 404 - .../splunktaucclib/global_config/schema.py | 77 - .../splunktaucclib/rest_handler/__init__.py | 3 - .../rest_handler/admin_external.py | 169 - .../rest_handler/credentials.py | 446 - .../splunktaucclib/rest_handler/eai.py | 59 - .../rest_handler/endpoint/__init__.py | 196 - .../rest_handler/endpoint/converter.py | 301 - .../rest_handler/endpoint/field.py | 63 - .../rest_handler/endpoint/validator.py | 470 -- .../splunktaucclib/rest_handler/entity.py | 19 - .../splunktaucclib/rest_handler/error.py | 45 - .../splunktaucclib/rest_handler/handler.py | 436 - .../splunktaucclib/rest_handler/schema.py | 41 - .../splunktaucclib/rest_handler/util.py | 41 - package/bin/da_ess_contentupdate_declare.py | 18 - package/bin/escu_contextualize.py | 2 +- package/bin/escu_investigate.py | 44 +- package/default/alert_actions.conf | 8 +- package/default/analytic_stories.conf | 20 +- .../default/data/ui/html/escu_nextsteps.html | 319 - package/default/eventtypes.conf | 3 +- package/default/macros.conf | 10 +- package/default/savedsearches.conf | 504 +- package/default/tags.conf | 3 +- package/default/transforms.conf | 2 +- package/default/use_case_library.conf | 52 +- 614 files changed, 228 insertions(+), 179470 deletions(-) delete mode 100755 package/bin/da_ess_contentupdate/alert_actions_base.py delete mode 100755 package/bin/da_ess_contentupdate/cim_actions.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/client.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/common/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/common/lib_util.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/common/log.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/common/util.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/configuration/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/configuration/loader.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/configuration/schema_1_0_0.json delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/cacerts/ca_certs_locater.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/defaults.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/engine.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/ext.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/http.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/models.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/pipemgr.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/core/template.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/log.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/rwlock.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/schema_meta.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/config.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_checkpoint_manager.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_config.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_consts.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_client.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_collector.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_loader.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_helper.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_mod_input.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/splunk_ta_import_declare.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/ta_cloud_connect_client.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/consts.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/log.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/pattern.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/util.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/xml_dom_parser.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/concurrent_executor.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/process_pool.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/thread_pool.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_endpoints.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_manager.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/data_input_endpoints.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/knowledge_objects.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/property_endpoints.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/request.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/ta_conf_manager.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/credentials.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/event_writer.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/file_monitor.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/kv_client.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/modinput.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/orphan_process_monitor.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/rest.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/job.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/scheduler.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/setting.conf delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_cluster.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_platform.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/state_store.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer.py delete mode 100755 package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer_queue.py delete mode 100755 package/bin/da_ess_contentupdate/decorator.py delete mode 100755 package/bin/da_ess_contentupdate/functools32/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/functools32/_dummy_thread32.py delete mode 100755 package/bin/da_ess_contentupdate/functools32/functools32.py delete mode 100755 package/bin/da_ess_contentupdate/functools32/reprlib32.py delete mode 100755 package/bin/da_ess_contentupdate/httplib2/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/httplib2/cacerts.txt delete mode 100755 package/bin/da_ess_contentupdate/httplib2/iri2uri.py delete mode 100755 package/bin/da_ess_contentupdate/httplib2/socks.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/_compat.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/_identifier.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/asyncfilters.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/asyncsupport.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/bccache.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/compiler.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/constants.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/debug.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/defaults.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/environment.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/exceptions.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/ext.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/filters.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/idtracking.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/lexer.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/loaders.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/meta.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/nativetypes.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/nodes.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/optimizer.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/parser.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/runtime.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/sandbox.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/tests.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/utils.py delete mode 100644 package/bin/da_ess_contentupdate/jinja2/visitor.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/_compat/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/_compat/ordereddict.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/_compat/prepareable.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/document.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/fields/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/fields/base.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/fields/compound.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/fields/primitive.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/fields/util.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/registry.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/resolutionscope.py delete mode 100755 package/bin/da_ess_contentupdate/jsl/roles.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/bin/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/bin/jsonpath.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/jsonpath.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/lexer.py delete mode 100755 package/bin/da_ess_contentupdate/jsonpath_rw/parser.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/__main__.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/_format.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/_reflect.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/_utils.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/_validators.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/_version.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/cli.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/compat.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/schemas/draft3.json delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/schemas/draft4.json delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/compat.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/test_cli.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/test_exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/test_format.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/test_jsonschema_test_suite.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/tests/test_validators.py delete mode 100755 package/bin/da_ess_contentupdate/jsonschema/validators.py delete mode 100755 package/bin/da_ess_contentupdate/logging_helper.py delete mode 100755 package/bin/da_ess_contentupdate/mako/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/mako/_ast_util.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ast.py delete mode 100755 package/bin/da_ess_contentupdate/mako/cache.py delete mode 100755 package/bin/da_ess_contentupdate/mako/cmd.py delete mode 100755 package/bin/da_ess_contentupdate/mako/codegen.py delete mode 100755 package/bin/da_ess_contentupdate/mako/compat.py delete mode 100755 package/bin/da_ess_contentupdate/mako/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/autohandler.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/babelplugin.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/beaker_cache.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/extract.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/linguaplugin.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/preprocessors.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/pygmentplugin.py delete mode 100755 package/bin/da_ess_contentupdate/mako/ext/turbogears.py delete mode 100755 package/bin/da_ess_contentupdate/mako/filters.py delete mode 100755 package/bin/da_ess_contentupdate/mako/lexer.py delete mode 100755 package/bin/da_ess_contentupdate/mako/lookup.py delete mode 100755 package/bin/da_ess_contentupdate/mako/parsetree.py delete mode 100755 package/bin/da_ess_contentupdate/mako/pygen.py delete mode 100755 package/bin/da_ess_contentupdate/mako/pyparser.py delete mode 100755 package/bin/da_ess_contentupdate/mako/runtime.py delete mode 100755 package/bin/da_ess_contentupdate/mako/template.py delete mode 100755 package/bin/da_ess_contentupdate/mako/util.py delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/_compat.py delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/_constants.py delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/_native.py delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/_speedups.c delete mode 100755 package/bin/da_ess_contentupdate/markupsafe/tests.py delete mode 100755 package/bin/da_ess_contentupdate/modalert_escu_contextualize_helper.py delete mode 100755 package/bin/da_ess_contentupdate/modalert_escu_investigate_helper.py delete mode 100755 package/bin/da_ess_contentupdate/modinput_wrapper/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/modinput_wrapper/base_modinput.py delete mode 100755 package/bin/da_ess_contentupdate/munch/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/munch/python3_compat.py delete mode 100755 package/bin/da_ess_contentupdate/ply/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/ply/cpp.py delete mode 100755 package/bin/da_ess_contentupdate/ply/ctokens.py delete mode 100755 package/bin/da_ess_contentupdate/ply/lex.py delete mode 100755 package/bin/da_ess_contentupdate/ply/yacc.py delete mode 100755 package/bin/da_ess_contentupdate/ply/ygen.py delete mode 100644 package/bin/da_ess_contentupdate/requests/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/__version__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/_internal_utils.py delete mode 100644 package/bin/da_ess_contentupdate/requests/adapters.py delete mode 100644 package/bin/da_ess_contentupdate/requests/api.py delete mode 100644 package/bin/da_ess_contentupdate/requests/auth.py delete mode 100755 package/bin/da_ess_contentupdate/requests/cacert.pem delete mode 100644 package/bin/da_ess_contentupdate/requests/certifi/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/certifi/__main__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/certifi/cacert.pem delete mode 100644 package/bin/da_ess_contentupdate/requests/certifi/core.py delete mode 100644 package/bin/da_ess_contentupdate/requests/certs.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/big5freq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/big5prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/chardistribution.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/charsetgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/charsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/cli/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/requests/chardet/cli/chardetect.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/codingstatemachine.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/compat.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/cp949prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/enums.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/escprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/escsm.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/eucjpprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/euckrfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/euckrprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/euctwfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/euctwprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/gb2312freq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/gb2312prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/hebrewprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/jisfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/jpcntx.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langbulgarianmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langcyrillicmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langgreekmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langhebrewmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langhungarianmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langthaimodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/langturkishmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/latin1prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/mbcharsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/mbcsgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/mbcssm.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/sbcharsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/sbcsgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/sjisprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/universaldetector.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/utf8prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/chardet/version.py delete mode 100644 package/bin/da_ess_contentupdate/requests/compat.py delete mode 100644 package/bin/da_ess_contentupdate/requests/cookies.py delete mode 100644 package/bin/da_ess_contentupdate/requests/exceptions.py delete mode 100644 package/bin/da_ess_contentupdate/requests/help.py delete mode 100644 package/bin/da_ess_contentupdate/requests/hooks.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/codec.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/compat.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/core.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/idnadata.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/intranges.py delete mode 100755 package/bin/da_ess_contentupdate/requests/idna/uts46data.py delete mode 100644 package/bin/da_ess_contentupdate/requests/models.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/big5freq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/big5prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/chardistribution.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/charsetgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/charsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/cli/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/chardet/cli/chardetect.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/codingstatemachine.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/compat.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/cp949prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/enums.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/escprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/escsm.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/eucjpprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/euckrfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/euckrprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/euctwfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/euctwprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/gb2312freq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/gb2312prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/hebrewprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/jisfreq.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/jpcntx.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langbulgarianmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langcyrillicmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langgreekmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langhebrewmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langhungarianmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langthaimodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/langturkishmodel.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/latin1prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/mbcharsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/mbcsgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/mbcssm.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/sbcharsetprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/sbcsgroupprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/sjisprober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/universaldetector.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/utf8prober.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/chardet/version.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/codec.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/compat.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/core.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/idnadata.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/intranges.py delete mode 100755 package/bin/da_ess_contentupdate/requests/packages/idna/uts46data.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/_collections.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/connection.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/connectionpool.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/_appengine_environ.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/_securetransport/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/_securetransport/bindings.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/_securetransport/low_level.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/appengine.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/ntlmpool.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/pyopenssl.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/securetransport.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/contrib/socks.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/exceptions.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/fields.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/filepost.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/backports/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/backports/makefile.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/six.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/poolmanager.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/request.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/response.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/connection.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/queue.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/request.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/response.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/retry.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/ssl_.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/timeout.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/url.py delete mode 100644 package/bin/da_ess_contentupdate/requests/packages/urllib3/util/wait.py delete mode 100644 package/bin/da_ess_contentupdate/requests/sessions.py delete mode 100644 package/bin/da_ess_contentupdate/requests/status_codes.py delete mode 100644 package/bin/da_ess_contentupdate/requests/structures.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/_collections.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/connection.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/connectionpool.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/_appengine_environ.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/_securetransport/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/_securetransport/bindings.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/_securetransport/low_level.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/appengine.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/ntlmpool.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/pyopenssl.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/securetransport.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/contrib/socks.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/exceptions.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/fields.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/filepost.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/backports/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/backports/makefile.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/six.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/ssl_match_hostname/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/packages/ssl_match_hostname/_implementation.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/poolmanager.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/request.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/response.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/__init__.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/connection.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/queue.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/request.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/response.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/retry.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/ssl_.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/timeout.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/url.py delete mode 100644 package/bin/da_ess_contentupdate/requests/urllib3/util/wait.py delete mode 100644 package/bin/da_ess_contentupdate/requests/utils.py delete mode 100755 package/bin/da_ess_contentupdate/six.py delete mode 100755 package/bin/da_ess_contentupdate/socks.py delete mode 100755 package/bin/da_ess_contentupdate/sockshandler.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/acl.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/compression.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/conf_manager.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/credentials.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/file_monitor.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/hec_config.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/ip_math.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/log.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/metadata.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/modular_input/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/modular_input/checkpointer.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/modular_input/event.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/modular_input/event_writer.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/modular_input/modular_input.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/net_utils.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/orphan_process_monitor.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/LICENSE delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/adapters.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/api.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/auth.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/certs.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/compat.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/cookies.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/hooks.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/models.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/big5freq.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/big5prober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/chardetect.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/chardistribution.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/charsetgroupprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/charsetprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/codingstatemachine.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/compat.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/constants.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/cp949prober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/escprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/escsm.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/eucjpprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/euckrfreq.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/euckrprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/euctwfreq.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/euctwprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/gb2312freq.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/gb2312prober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/hebrewprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/jisfreq.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/jpcntx.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langbulgarianmodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langcyrillicmodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langgreekmodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langhebrewmodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langhungarianmodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/langthaimodel.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/latin1prober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/mbcharsetprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/mbcsgroupprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/mbcssm.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/sbcharsetprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/sbcsgroupprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/sjisprober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/universaldetector.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/chardet/utf8prober.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/_collections.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/connection.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/connectionpool.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/contrib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/contrib/appengine.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/contrib/ntlmpool.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/contrib/pyopenssl.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/fields.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/filepost.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/packages/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/packages/ordered_dict.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/packages/six.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/poolmanager.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/request.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/response.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/connection.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/request.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/response.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/retry.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/ssl_.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/timeout.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/packages/urllib3/util/url.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/sessions.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/status_codes.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/structures.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/requests/utils.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/LICENSE delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/common.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/compat.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/contrib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/contrib/mongo.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/datastructures.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/exceptions.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/models.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/transforms.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/base.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/compound.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/net.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/serializable.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/types/union.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/undefined.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/util.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/schematics/validate.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/sortedcontainers/LICENSE delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/sortedcontainers/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/sortedcontainers/sorteddict.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/sortedcontainers/sortedlist.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/sortedcontainers/sortedset.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/binding.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/client.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/data.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/argument.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/event.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/event_writer.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/input_definition.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/scheme.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/script.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/utils.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/modularinput/validation_definition.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/ordereddict.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/results.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/decorators.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/environment.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/eventing_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/external_search_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/generating_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/internals.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/reporting_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/search_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/streaming_command.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/packages/splunklib/searchcommands/validators.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/pattern.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/server_info.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/splunk_rest_client.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/splunkenv.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/time_parser.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/timer_queue.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/user_access.py delete mode 100755 package/bin/da_ess_contentupdate/solnlib/utils.py delete mode 100755 package/bin/da_ess_contentupdate/sortedcontainers/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/sortedcontainers/sorteddict.py delete mode 100755 package/bin/da_ess_contentupdate/sortedcontainers/sortedlist.py delete mode 100755 package/bin/da_ess_contentupdate/sortedcontainers/sortedset.py delete mode 100755 package/bin/da_ess_contentupdate/splunk_aoblib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunk_aoblib/rest_helper.py delete mode 100755 package/bin/da_ess_contentupdate/splunk_aoblib/rest_migration.py delete mode 100755 package/bin/da_ess_contentupdate/splunk_aoblib/setup_util.py delete mode 100755 package/bin/da_ess_contentupdate/splunk_aoblib/utility.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/binding.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/client.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/data.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/argument.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/event.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/event_writer.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/input_definition.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/scheme.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/script.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/utils.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/modularinput/validation_definition.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/ordereddict.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/results.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/decorators.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/environment.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/eventing_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/external_search_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/generating_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/internals.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/reporting_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/search_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/streaming_command.py delete mode 100755 package/bin/da_ess_contentupdate/splunklib/searchcommands/validators.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/global_config/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/global_config/configuration.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/global_config/schema.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/admin_external.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/credentials.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/eai.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/endpoint/__init__.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/endpoint/converter.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/endpoint/field.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/endpoint/validator.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/entity.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/error.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/handler.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/schema.py delete mode 100755 package/bin/da_ess_contentupdate/splunktaucclib/rest_handler/util.py delete mode 100755 package/bin/da_ess_contentupdate_declare.py mode change 100755 => 100644 package/bin/escu_investigate.py delete mode 100644 package/default/data/ui/html/escu_nextsteps.html diff --git a/bin/generate.py b/bin/generate.py index 6949925221..a253a4d9d9 100644 --- a/bin/generate.py +++ b/bin/generate.py @@ -149,10 +149,6 @@ def identify_next_steps(detections, investigations): next_steps += "Based on ESCU investigate recommendations:\\n%s\"}" % (investigations_output) if has_phantom: detection['recommended_actions'] = 'runphantomplaybook, escu_investigate' - else: - detection['recommended_actions'] = 'escu_investigate' - detection['next_steps'] = next_steps - enriched_detections.append(detection) return enriched_detections diff --git a/bin/jinja2_templates/savedsearches.j2 b/bin/jinja2_templates/savedsearches.j2 index 4382cfa1e7..8e50fabe6a 100644 --- a/bin/jinja2_templates/savedsearches.j2 +++ b/bin/jinja2_templates/savedsearches.j2 @@ -79,8 +79,6 @@ action.notable.param.severity = {{ detection.confidence }} action.notable.param.drilldown_name = {{ correlation_rule.notable.drilldown_name }} action.notable.param.drilldown_search = {{ correlation_rule.notable.drilldown_search }} {% endif %} -action.notable.param.recommended_actions = {{ detection.recommended_actions }} -action.notable.param.next_steps = {{ detection.next_steps }} {% if correlation_rule.risk is defined %} action.risk = 1 action.risk.param._risk_object = {{ correlation_rule.risk.risk_object }} diff --git a/package/README/savedsearches.conf.example b/package/README/savedsearches.conf.example index 756d770184..9aefc86a96 100644 --- a/package/README/savedsearches.conf.example +++ b/package/README/savedsearches.conf.example @@ -30,8 +30,6 @@ action.notable.param.rule_description = Your AWS infrastructure was provisioned action.notable.param.rule_title = AWS Provision Activity From $city$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.recommended_actions = escu_investigate -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\nESCU - Get All AWS Activity From IP Address\nESCU - Get All AWS Activity From City\n"} action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system @@ -98,4 +96,4 @@ action.escu.known_false_positives = disabled=true schedule_window = auto is_visible = false -search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count \ No newline at end of file +search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count diff --git a/package/bin/da_ess_contentupdate/alert_actions_base.py b/package/bin/da_ess_contentupdate/alert_actions_base.py deleted file mode 100755 index fc8ce27915..0000000000 --- a/package/bin/da_ess_contentupdate/alert_actions_base.py +++ /dev/null @@ -1,211 +0,0 @@ -import csv -import gzip -import sys - -from splunk.clilib.bundle_paths import make_splunkhome_path - -sys.path.insert(0, make_splunkhome_path(["etc", "apps", "Splunk_SA_CIM", "lib"])) - -import requests -from cim_actions import ModularAction -from logging_helper import get_logger -import logging -from splunk_aoblib.rest_helper import TARestHelper -from splunk_aoblib.setup_util import Setup_Util - - -class ModularAlertBase(ModularAction): - def __init__(self, ta_name, alert_name): - self._alert_name = alert_name - # self._logger_name = "modalert_" + alert_name - self._logger_name = alert_name + "_modalert" - self._logger = get_logger(self._logger_name) - super(ModularAlertBase, self).__init__( - sys.stdin.read(), self._logger, alert_name) - self.setup_util_module = None - self.setup_util = None - self.result_handle = None - self.ta_name = ta_name - self.splunk_uri = self.settings.get('server_uri') - self.setup_util = Setup_Util(self.splunk_uri, self.session_key, self._logger) - - level = self.get_log_level() - if level: - self._logger.setLevel(level) - self.rest_helper = TARestHelper(self._logger) - - def log_error(self, msg): - self.message(msg, 'failure', level=logging.ERROR) - - def log_info(self, msg): - self.message(msg, 'success', level=logging.INFO) - - def log_debug(self, msg): - self.message(msg, None, level=logging.DEBUG) - - def log_warn(self, msg): - self.message(msg, None, level=logging.WARN) - - def set_log_level(self, level): - self._logger.setLevel(level) - - def get_param(self, param_name): - return self.configuration.get(param_name) - - def get_global_setting(self, var_name): - return self.setup_util.get_customized_setting(var_name) - - def get_user_credential(self, username): - ''' - if the username exists, return - { - "username": username, - "password": credential - } - ''' - return self.setup_util.get_credential_by_username(username) - - @property - def log_level(self): - return self.get_log_level() - - @property - def proxy(self): - return self.get_proxy() - - def get_log_level(self): - return self.setup_util.get_log_level() - - def get_proxy(self): - ''' if the proxy setting is set. return a dict like - { - proxy_url: ... , - proxy_port: ... , - proxy_username: ... , - proxy_password: ... , - proxy_type: ... , - proxy_rdns: ... - } - ''' - return self.setup_util.get_proxy_settings() - - def _get_proxy_uri(self): - uri = None - proxy = self.get_proxy() - if proxy and proxy.get('proxy_url') and proxy.get('proxy_type'): - uri = proxy['proxy_url'] - if proxy.get('proxy_port'): - uri = '{0}:{1}'.format(uri, proxy.get('proxy_port')) - if proxy.get('proxy_username') and proxy.get('proxy_password'): - uri = '{0}://{1}:{2}@{3}/'.format(proxy['proxy_type'], proxy[ - 'proxy_username'], proxy['proxy_password'], uri) - else: - uri = '{0}://{1}'.format(proxy['proxy_type'], uri) - return uri - - def send_http_request(self, url, method, parameters=None, payload=None, headers=None, cookies=None, verify=True, cert=None, timeout=None, use_proxy=True): - return self.rest_helper.send_http_request(url=url, method=method, parameters=parameters, payload=payload, - headers=headers, cookies=cookies, verify=verify, cert=cert, - timeout=timeout, - proxy_uri=self._get_proxy_uri() if use_proxy else None) - - def build_http_connection(self, config, timeout=120, - disable_ssl_validation=False): - from httplib2 import (socks, ProxyInfo, Http) - """ - :config: dict like, proxy and account information are in the following - format { - "username": xx, - "password": yy, - "proxy_url": zz, - "proxy_port": aa, - "proxy_username": bb, - "proxy_password": cc, - "proxy_type": http,http_no_tunnel,sock4,sock5, - "proxy_rdns": 0 or 1, - } - :return: Http2.Http object - """ - if not config: - config = {} - - proxy_type_to_code = { - "http": socks.PROXY_TYPE_HTTP, - "http_no_tunnel": socks.PROXY_TYPE_HTTP_NO_TUNNEL, - "socks4": socks.PROXY_TYPE_SOCKS4, - "socks5": socks.PROXY_TYPE_SOCKS5, - } - if config.get("proxy_type") in proxy_type_to_code: - proxy_type = proxy_type_to_code[config["proxy_type"]] - else: - proxy_type = socks.PROXY_TYPE_HTTP - - rdns = config.get("proxy_rdns") - - proxy_info = None - if config.get("proxy_url") and config.get("proxy_port"): - if config.get("proxy_username") and config.get("proxy_password"): - proxy_info = ProxyInfo(proxy_type=proxy_type, - proxy_host=config["proxy_url"], - proxy_port=int(config["proxy_port"]), - proxy_user=config["proxy_username"], - proxy_pass=config["proxy_password"], - proxy_rdns=rdns) - else: - proxy_info = ProxyInfo(proxy_type=proxy_type, - proxy_host=config["proxy_url"], - proxy_port=int(config["proxy_port"]), - proxy_rdns=rdns) - if proxy_info: - http = Http(proxy_info=proxy_info, timeout=timeout, - disable_ssl_certificate_validation=disable_ssl_validation) - else: - http = Http(timeout=timeout, - disable_ssl_certificate_validation=disable_ssl_validation) - - if config.get("username") and config.get("password"): - http.add_credentials(config["username"], config["password"]) - return http - - def process_event(self, *args, **kwargs): - raise NotImplemented() - - def pre_handle(self, num, result): - result.setdefault('rid', str(num)) - self.update(result) - return result - - def get_events(self): - self.result_handle = gzip.open(self.results_file, 'rb') - return (self.pre_handle(num, result) for num, result in enumerate(csv.DictReader(self.result_handle))) - - def prepare_meta_for_cam(self): - with gzip.open(self.results_file, 'rb') as rf: - for num, result in enumerate(csv.DictReader(rf)): - result.setdefault('rid', str(num)) - self.update(result) - self.invoke() - break - - def run(self, argv): - status = 0 - if len(argv) < 2 or argv[1] != "--execute": - msg = 'Error: argv="{}", expected="--execute"'.format(argv) - print >> sys.stderr, msg - sys.exit(1) - - try: - status = self.process_event() - except Exception as e: - msg = "Unexpected error: {}." - if e.message: - self.log_error(msg.format(e.message)) - else: - import traceback - self.log_error(msg.format(traceback.format_exc())) - sys.exit(2) - finally: - if self.result_handle: - self.result_handle.close() - - return status diff --git a/package/bin/da_ess_contentupdate/cim_actions.py b/package/bin/da_ess_contentupdate/cim_actions.py deleted file mode 100755 index 7a7813d4f6..0000000000 --- a/package/bin/da_ess_contentupdate/cim_actions.py +++ /dev/null @@ -1,508 +0,0 @@ -import collections -import csv -import json -import logging -import logging.handlers -import os -import random -import re -import splunk.rest as rest -import time - -from splunk.clilib.bundle_paths import make_splunkhome_path -from splunk.util import mktimegm, normalizeBoolean - -# set the maximum allowable CSV field size -# -# The default of the csv module is 128KB; upping to 10MB. See SPL-12117 for -# the background on issues surrounding field sizes. -# (this method is new in python 2.5) -csv.field_size_limit(10485760) - - -class InvalidResultID(Exception): - pass - - -class ModularAction(object): - DEFAULT_MSGFIELDS = ['signature', - 'action_name', - 'search_name', - 'sid', - 'orig_sid', - 'rid', - 'orig_rid', - 'app', - 'user', - 'action_mode', - 'action_status'] - DEFAULT_MESSAGE = 'sendmodaction - ' + ' '.join(['{i}="{{d[{i}]}}"'.format(i=i) for i in DEFAULT_MSGFIELDS]) - # The above yields a string.format() compatible format string: - # - # 'sendmodaction - signature="{d[signature]}" action_name="{d[action_name]}" - # search_name="{d[search_name]}" sid="{d[sid]}" orig_sid="{d[orig_sid]}" - # rid="{d[rid]}" orig_rid="{d[orig_rid]}" app="{d[app]}" user="{d[user]}" - # action_mode="{d[action_mode]}" action_status="{d[action_status]}"' - - DEFAULT_DROPEXP = lambda x: ((x.startswith('_') and x not in ['_raw', '_time']) - or x.startswith('date_') - or x in ['punct', 'sid', 'rid', 'orig_sid', 'orig_rid']) - - DEFAULT_MAPEXP = lambda x: (x.startswith('tag::') - or x in ['_time', '_raw', 'splunk_server', 'index', - 'source', 'sourcetype', 'host', 'linecount', - 'timestartpos', 'timeendpos', 'eventtype', - 'tag', 'search_name', 'event_hash', 'event_id']) - - DEFAULT_HEADER = '***SPLUNK*** index="%s" host="%s" source="%s"' - DEFAULT_BREAKER = '==##~~##~~ 1E8N3D4E6V5E7N2T9 ~~##~~##==\n' - DEFAULT_IDLINE = '***Common Action Model*** orig_action_name="%s" orig_sid="%s" orig_rid="%s" sourcetype="%s"\n' - DEFAULT_INDEX = 'summary' - DEFAULT_CHUNK = 50000 - - SHORT_FORMAT = '%(asctime)s %(levelname)s %(message)s' - - def __init__(self, settings, logger, action_name='unknown'): - """ Initialize ModularAction class. - - @param settings: A modular action payload in JSON format. - @param logger: A logging instance. - Recommend using ModularAction.setup_logger. - @param action_name: The action name. - action_name in payload will take precedence. - """ - self.settings = json.loads(settings) - self.logger = logger - self.session_key = self.settings.get('session_key') - self.sid = self.settings.get('sid') - self.sid_snapshot = '' - ## if sid contains rt_scheduler with snapshot-sid; drop snapshot-sid - ## sometimes self.sid may be an integer (1465593470.1228) - try: - rtsid = re.match('^(rt_scheduler.*)\.(\d+)$', self.sid) - if rtsid: - self.sid = rtsid.group(1) - self.sid_snapshot = rtsid.group(2) - except: - pass - - ## rid_ntuple is a named tuple that represents - ## the three variables that change on a per-result basis - self.rid_ntuple = collections.namedtuple('ID', ['orig_sid','rid','orig_rid']) - ## rids is a list of rid_ntuple values - ## automatically maintained by update() calls - self.rids = [] - ## current orig_sid based on update() - ## aka self.rids[-1].orig_sid - self.orig_sid = '' - ## current rid based on update() - ## aka self.rids[-1].rid - self.rid = '' - ## current orig_rid based on update() - ## aka self.rids[-1].orig_rid - self.orig_rid = '' - - self.results_file = self.settings.get('results_file') - ## info - self.info = {} - if self.results_file: - self.info_file = os.path.join(os.path.dirname(self.results_file), 'info.csv') - self.search_name = self.settings.get('search_name') - self.app = self.settings.get('app') - self.user = self.settings.get('user') or self.settings.get('owner') - self.configuration = self.settings.get('configuration', {}) - ## enforce configuration is a 'dict' - if not isinstance(self.configuration, dict): - self.configuration = {} - ## set loglevel to DEBUG if verbose - if normalizeBoolean(self.configuration.get('verbose', 'false')): - self.logger.setLevel(logging.DEBUG) - self.logger.debug('loglevel set to DEBUG') - ## use | sendalert param.action_name=$action_name$ - self.action_name = self.configuration.get('action_name') or action_name - ## use sid to determine action_mode - if isinstance(self.sid, basestring) and 'scheduler' in self.sid: - self.action_mode = 'saved' - else: - self.action_mode = 'adhoc' - - self.action_status = '' - ## Since we don't use the result object we get from settings it will be purged - try: - del self.settings['result'] - except Exception: - pass - ## events - self.events = [] - - def addinfo(self): - """ The purpose of this method is to populate the - modular action info variable with the contents of info.csv. - - @raise Exception: raises Exception if self.info_file could not be opened - or if there were problems parsing the info.csv data - """ - if self.info_file: - try: - with open(self.info_file, 'rU') as fh: - self.info = csv.DictReader(fh).next() - except Exception as e: - self.message('Could not retrieve info.csv', level=logging.WARN) - - def addjobinfo(self): - """ The purpose of this method is to populate the job variable - with the contents from REST (/services/search/jobs/) - - SPL-112815 - sendalert - not all $job.$ parameters come through - - @raise Exception: raises Exception if search job information could not - be retrieved via REST (search/jobs) based on self.sid - """ - self.job = {} - if self.sid: - try: - response, content = rest.simpleRequest('search/jobs/%s' % self.sid, - sessionKey=self.session_key, - getargs={'output_mode': 'json'}) - if response.status == 200: - self.job = json.loads(content)['entry'][0]['content'] - self.message('Successfully retrieved search job info') - self.logger.debug(self.job) - else: - self.message('Could not retrieve search job info', level=logging.WARN) - except Exception as e: - self.message('Could not retrieve search job info', level=logging.WARN) - - def message(self, signature, status=None, rids=None, level=logging.INFO, **kwargs): - """ The purpose of this method is to provide a common messaging interface. - - @param signature: A string representing the message we want to log. - @param status: An optional status that we want to log. - Defaults to None. - @param rids: An optional list of rid_ntuple values in case we - want to generate the message for multiple rids. - Defaults to None (use the rid currently loaded). - @param level: The logging level to use when writing the message. - Defaults to logging.INFO (INFO) - @param kwargs: Additional keyword arguments to be included with the - message. - Defaults to "no arguments". - - @return message: This method logs the message; however, for - backwards compatibility we also return the message. - """ - ## status - status = status or self.action_status or '' - ## rid - if not isinstance(rids, list): - rids = [self.rid_ntuple(self.orig_sid, self.rid, self.orig_rid)] - ## kwargs - prune any duplicate keys based on DEFAULT_MSGFIELDS - ## prune any keys with special characters [A-Za-z_]+ - newargs = [x for x in kwargs\ - if (x not in ModularAction.DEFAULT_MSGFIELDS) and re.match('[A-Za-z_]+', x)] - ## MSG - msg = '%s %s' % (ModularAction.DEFAULT_MESSAGE, ' '.join(['{i}="{{d[{i}]}}"'.format(i=i) for i in newargs])) - - # This will set the default value of any value NOT in the dictionary to the - # empty string. - argsdict = collections.defaultdict(str) - # order is important here - here we update first from kwargs, then from our - # expected arg set. - argsdict.update(kwargs) - argsdict.update({ - 'signature': signature or '', - 'action_name': self.action_name or '', - 'search_name': self.search_name or '', - 'sid': self.sid or '', - 'app': self.app or '', - 'user': self.user or '', - 'action_mode': self.action_mode or '', - 'action_status': status - }) - - for rid_ntuple in rids: - if len(rid_ntuple)==3: - ## Update the arguments dictionary - argsdict.update({ - 'orig_sid': rid_ntuple.orig_sid or '', - 'rid': rid_ntuple.rid or '', - 'orig_rid': rid_ntuple.orig_rid or '' - }) - ## This is where the magic happens. The format string will use the - ## attributes of "argsdict" - message = msg.format(d=argsdict) - ## prune empty string key-value pairs - for match in re.finditer('[A-Za-z_]+=\"\"(\s|$)', message): - message = message.replace(match.group(0),'',1) - message = message.strip() - self.logger.log(level, message) - else: - self.logger.warn('Could not unpack rid_ntuple') - message = '' - - return message - - def update(self, result): - """ The purpose of this method is to update the ModularAction instance - identifiers based on the current result being operated on. - - This is the most important method in the library as it sets up - rid, orig_sid, and orig_rid to be used by subsequent class methods. - - Not calling update() immediately for each result before doing additional - work can have adverse affects. - - @param signature: A string representing the message we want to log. - @param status: An optional status that we want to log. - Defaults to None. - @param rids: An optional list of rid_ntuple values in case we - want to generate the message for multiple rids. - Defaults to None (use the rid currently loaded). - @param level: The logging level to use when writing the message. - Defaults to logging.INFO (INFO) - @param kwargs: Additional keyword arguments to be included with the - message. - Defaults to "no arguments". - - @return message: This method logs the message; however, for - backwards compatiblity we also return the message. - """ - ## This is for events/results that were created as the result of a previous action - self.orig_sid = result.get('orig_sid', '') - ## This is for events/results that were created as the result of a previous action - self.orig_rid = result.get('orig_rid', '') - if 'rid' in result and isinstance(result['rid'], (basestring, int)): - self.rid = str(result['rid']) - if self.sid_snapshot: - self.rid = '%s.%s' % (self.rid, self.sid_snapshot) - ## add result info to list of named tuples - self.rids.append(self.rid_ntuple(self.orig_sid, self.rid, self.orig_rid)) - else: - raise InvalidResultID('Result must have an ID') - - def invoke(self): - """ The purpose of this method is to generate per-result invocation messages. - This method is used to identify that an action is being attempted on a per-result basis. - - Remember to call update() prior to invoke() to ensure that the invocation message - reflects the appropriate identifiers. - """ - self.message('Invoking modular action') - - def result2stash(self, result, dropexp=DEFAULT_DROPEXP, mapexp=DEFAULT_MAPEXP, addinfo=False): - """ The purpose of this method is to formulate an event in stash format - - @param result: The result dictionary to generate a stash event for. - @param dropexp: A lambda expression used to determine whether a field - should be dropped or not. - Defaults to DEFAULT_DROPEXP. - @param mapexp: A lambda expression used to determine whether a field - should be mapped (prepended with "orig_") or not. - Defaults to DEFAULT_MAPEXP. - @param addinfo: Whether or not to add search information to the event. - "info" includes search_now, info_min_time, info_max_time, - and info_search_time fields. - Requires that information was loaded into the ModularAction - instance via addinfo() - - @return _raw: Returns a string which represents the result in stash format. - - The following example has been broken onto multiple lines for readability: - 06/21/2016 10:00:00 -0700, - search_name="Access - Brute Force Access Behavior Detected - Rule", - search_now=0.000, info_min_time=1466528400.000, info_max_time=1466532600.000, info_search_time=1465296264.179, - key1=key1val, key2=key2val, key3=key3val, key4=key4val1, key4=key4val2, ... - """ - dropexp = dropexp or (lambda x: False) - mapexp = mapexp or (lambda x: False) - orig_dropexp = lambda x: x.startswith('orig_') and x[5:] in result and mapexp(x[5:]) - - ## addinfo - if addinfo: - result['info_min_time'] = self.info.get('_search_et', '0.000') - info_max_time = self.info.get('_search_lt') - if not info_max_time or info_max_time==0 or info_max_time=='0': - info_max_time = '+Infinity' - result['info_max_time'] = info_max_time - result['info_search_time'] = self.info.get('_timestamp', '') - - ## construct _raw - _raw = '%s' % result.get('_time', mktimegm(time.gmtime())) - if self.search_name: - _raw += ', search_name="%s"' % self.search_name - - processed_keys = [] - for key, val in sorted(result.items()): - vals = [] - ## if we have a proper mv field - if (key.startswith('__mv_') - and val and isinstance(val, basestring) - and val.startswith('$') and val.endswith('$')): - real_key = key[5:] - vals = val[1:-1].split('$;$') - ## if proper sv field - elif val and not key.startswith('__mv_'): - real_key = key - vals = [val] - - ## if we have vals and key hasn't been processed - ## and key is not to be dropped... - if (vals - and (real_key not in processed_keys) - and not dropexp(real_key) - and not orig_dropexp(real_key)): - ## iterate vals - for val in vals: - ## format literal '$' - if key.startswith('__mv'): - val = val.replace('$$', '$') - ## escape quotes - if isinstance(val, basestring): - val = val.replace('"', r'\"') - ## check map - if mapexp(real_key): - _raw += ', %s="%s"' % ('orig_' + real_key.lstrip('_'), val) - else: - _raw += ', %s="%s"' % (real_key, val) - processed_keys.append(real_key) - - return _raw - - def addevent(self, raw, sourcetype, cam_header=True): - """ The purpose of this method is to add a properly constructed event - to the events list in the ModularAction instance. This ensures events - are created with the appropriate index-time header. - - The index-time header is responsible for setting sourcetype, - orig_action_name, orig_sid, and orig_rid. The index-time header will - not be present in the _raw of generated events. - - Remember to call update() prior to addevent() to ensure that the events - reflect the appropriate orig_sid and orig_rid identifiers. - - @param raw: The text of the event you want to generate. - @param sourcetype: The sourcetype of the event you want to generate. - @param cam_header: Optionally exclude the inclusion of the index-time header. - Defaults to True (include header). - """ - if cam_header: - if self.orig_sid: - action_idline = ModularAction.DEFAULT_IDLINE % ( - self.action_name, - self.orig_sid, - self.orig_rid, - sourcetype) - else: - action_idline = ModularAction.DEFAULT_IDLINE % ( - self.action_name, - self.sid, - self.rid, - sourcetype) - self.events.append(action_idline + raw) - else: - self.events.append(raw) - - def writeevents(self, index='summary', host=None, source=None, fext='common_action_model'): - """ The purpose of this method is to create arbitrary splunk events - from the list of events in the ModularAction instance. - - Please use addevent() for populating the list of events in - the ModularAction instance. - - @param index: The index to write the events to. - Defaults to "summary". - @param host: The value of host the events should take on. - Defaults to None (auto). - @param source: The value of source the events should take on. - Defaults to None (auto). - @param fext: The extension of the file to write out. - Files are written to $SPLUNK_HOME/var/spool/splunk. - File extensions can only contain word characters, - dash, and have a 200 char max. - "stash_" is automatically prepended to all extensions. - Defaults to "common_action_model" ("stash_common_action_model"). - Only override if you've set up a corresponding props.conf - stanza to handle the extension. - - @return bool: Returns True if all events were successfully written - Returns False if any errors were encountered - """ - ## internal makeevents method for normalizing strings - ## that will be used in the various headers we write out - def get_string(input, default): - try: - return input.replace('"', '_') - except AttributeError: - return default - - if self.events: - ## sanitize file extension - if not fext or not re.match('^[\w-]+$', fext): - self.logger.warn('Requested file extension was ignored due to invalid characters') - fext = 'common_action_model' - elif len(fext)>200: - self.logger.warn('Requested file extension was ignored due to length') - fext = 'common_action_model' - ## header - header_line = ModularAction.DEFAULT_HEADER % ( - get_string(index, ModularAction.DEFAULT_INDEX), - get_string(host, ''), - get_string(source, '')) - ## process event chunks - for chunk in (self.events[x:x+ModularAction.DEFAULT_CHUNK] - for x in xrange(0, len(self.events), ModularAction.DEFAULT_CHUNK)): - ## initialize output string - default_breaker = '\n' + ModularAction.DEFAULT_BREAKER - fout = header_line + default_breaker + (default_breaker).join(chunk) - ## write output string - try: - fn = '%s_%s.stash_%s' % (mktimegm(time.gmtime()), random.randint(0, 100000), fext) - fp = make_splunkhome_path(['var', 'spool', 'splunk', fn]) - ## obtain fh - with open(fp, 'w') as fh: - fh.write(fout) - except: - signature = 'Error obtaining file handle during makeevents' - self.message(signature, level=logging.ERROR, file_path=fp) - self.logger.exception(signature + ' file_path=%s' % fp) - return False - self.message('Successfully created splunk events', event_count=len(self.events)) - return True - return False - - def dowork(self): - """ This method serves as an illustration stub. - Serves as a container for operations which satisfy the nature of the action. - For instance, the third party API call. - - For cleanliness it is recommended that you subclass ModularAction - and implement your own dowork() method. - """ - return - - @staticmethod - def setup_logger(name, level=logging.INFO, maxBytes=25000000, backupCount=5, format=SHORT_FORMAT): - """ Set up a logging instance. - - @param name: The log file name. - We recommend "$action_name$_modalert". - @param level: The logging level. - @param maxBytes: The maximum log file size before rollover. - @param backupCount: The number of log files to retain. - - @return logger: Returns an instance of logger - """ - logfile = make_splunkhome_path(['var', 'log', 'splunk', name + '.log']) - logger = logging.getLogger(name) - logger.setLevel(level) - logger.propagate = False # Prevent the log messages from being duplicated in the python.log file - - # Prevent re-adding handlers to the logger object, which can cause duplicate log lines. - handler_exists = any([True for h in logger.handlers if h.baseFilename == logfile]) - if not handler_exists: - file_handler = logging.handlers.RotatingFileHandler(logfile, maxBytes=maxBytes, backupCount=backupCount) - formatter = logging.Formatter(format) - file_handler.setFormatter(formatter) - logger.addHandler(file_handler) - - return logger diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/__init__.py deleted file mode 100755 index 1123e90e0b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -""" -APP Cloud Connect -""" -import os - -from .common.lib_util import register_cacert_locater - -register_cacert_locater(os.path.join(os.path.dirname(__file__), 'core', 'cacerts')) - -__version__ = '1.0.1' diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/client.py b/package/bin/da_ess_contentupdate/cloudconnectlib/client.py deleted file mode 100755 index 7f7bd42b8b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/client.py +++ /dev/null @@ -1,77 +0,0 @@ -import copy -import os.path -import traceback - -from .common.log import get_cc_logger -from .common.util import load_json_file -from .configuration import get_loader_by_version -from .core import CloudConnectEngine -from .core.exceptions import ConfigException - -_logger = get_cc_logger() - - -class CloudConnectClient(object): - """The client of cloud connect used to start a cloud connect engine instance. - """ - - def __init__(self, context, config_file, checkpoint_mgr): - """ - Constructs a `CloudConnectClient` with `context` which contains variables - to render template in the configuration parsed from file `config_file`. - :param context: context to render template. - :param config_file: file path for load user passed interface. - """ - self._context = context - self._config_file = config_file - self._engine = None - self._config = None - self._checkpoint_mgr = checkpoint_mgr - - def _load_config(self): - """Load a JSON based configuration definition from file. - :return: A `dict` contains user defined JSON interface. - """ - try: - conf = load_json_file(self._config_file) - except: - raise ConfigException( - 'Unable to load configuration file %s: %s' - % (self._config_file, traceback.format_exc()) - ) - - version = conf.get('meta', {'apiVersion', None}).get('apiVersion', None) - if not version: - raise ConfigException( - 'Config meta or api version not present in {}'.format( - self._config_file)) - - config_loader, schema_file = get_loader_by_version(version) - schema_path = os.path.join( - os.path.dirname(__file__), 'configuration', schema_file) - - return config_loader.load(conf, schema_path, self._context) - - def start(self): - """ - Initialize a new `CloudConnectEngine` instance and start it. - """ - try: - if self._config is None: - self._config = self._load_config() - - self._engine = CloudConnectEngine() - self._engine.start( - context=copy.deepcopy(self._context), - config=self._config, - checkpoint_mgr=self._checkpoint_mgr - ) - except Exception as ex: - _logger.exception('Error while starting client') - raise ex - - def stop(self): - """Stop the current cloud connect engine. - """ - if self._engine: - self._engine.stop() diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/common/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/common/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/common/lib_util.py b/package/bin/da_ess_contentupdate/cloudconnectlib/common/lib_util.py deleted file mode 100755 index 08014a492c..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/common/lib_util.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import os.path as op -import platform -import sys - -import __main__ - -from ..splunktacollectorlib.common import log as stulog - - -def get_main_file(): - """Return the running mod input file""" - return __main__.__file__ - - -def get_app_root_dir(): - """Return the root dir of app""" - return op.dirname(op.dirname(op.abspath(get_main_file()))) - - -def get_mod_input_script_name(): - """Return the name of running mod input""" - script_name = os.path.basename(get_main_file()) - if script_name.lower().endswith('.py'): - script_name = script_name[:-3] - return script_name - - -def register_module(new_path): - """ register_module(new_path): adds a directory to sys.path. - Do nothing if it does not exist or if it's already in sys.path. - """ - if not os.path.exists(new_path): - return - - new_path = os.path.abspath(new_path) - if platform.system() == 'Windows': - new_path = new_path.lower() - for x in sys.path: - x = os.path.abspath(x) - if platform.system() == 'Windows': - x = x.lower() - if new_path in (x, x + os.sep): - return - sys.path.insert(0, new_path) - - -def register_cacert_locater(cacerts_locater_path): - for x in sys.modules: - if (x == "httplib2" or x.endswith(".httplib2")) and sys.modules[x] \ - is not None: - stulog.logger.warning("Httplib2 module '{}' is already installed. " - "The ca_certs_locater may not work".format(x)) - register_module(cacerts_locater_path) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/common/log.py b/package/bin/da_ess_contentupdate/cloudconnectlib/common/log.py deleted file mode 100755 index bdc92a2702..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/common/log.py +++ /dev/null @@ -1,32 +0,0 @@ -import logging - -from solnlib.pattern import Singleton -from ..splunktacollectorlib.common import log as stulog - - -class CloudClientLogAdapter(logging.LoggerAdapter): - __metaclass__ = Singleton - - def __init__(self, logger=None, extra=None, prefix=""): - super(CloudClientLogAdapter, self).__init__(logger, extra) - self.cc_prefix = prefix if prefix else "" - - def process(self, msg, kwargs): - msg = "{} {}".format(self.cc_prefix, msg) - return super(CloudClientLogAdapter, self).process(msg, kwargs) - - def set_level(self, val): - self.logger.setLevel(val) - - -_adapter = CloudClientLogAdapter(stulog.logger) - - -def set_cc_logger(logger, logger_prefix=''): - global _adapter - _adapter.logger = logger - _adapter.cc_prefix = logger_prefix or '' - - -def get_cc_logger(): - return _adapter diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/common/util.py b/package/bin/da_ess_contentupdate/cloudconnectlib/common/util.py deleted file mode 100755 index 1d1133eacd..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/common/util.py +++ /dev/null @@ -1,48 +0,0 @@ -import json -from ..splunktalib.common import util -from solnlib.modular_input.event import XMLEvent - - -def is_valid_bool(val): - """Check whether a string can be convert to bool. - :param val: value as string. - :return: `True` if value can be convert to bool else `False`. - """ - return util.is_true(val) or util.is_false(val) - - -def is_true(val): - return util.is_true(val) - - -def is_valid_port(port): - """Check whether a port is valid. - :param port: port to check. - :return: `True` if port is valid else `False`. - """ - try: - return 1 <= int(port) <= 65535 - except ValueError: - return False - - -def load_json_file(file_path): - """ - Load a dict from a JSON file. - :param file_path: JSON file path. - :return: A `dict` object. - """ - with open(file_path, 'r') as file_pointer: - return json.load(file_pointer) - - -def format_events(raw_events, time=None, - index=None, host=None, source=None, sourcetype=None, - stanza=None, unbroken=False, done=False): - return XMLEvent.format_events(XMLEvent(data, time=time, - index=index, host=host, - source=source, - sourcetype=sourcetype, - stanza=stanza, unbroken=unbroken, - done=done) for data in - raw_events) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/__init__.py deleted file mode 100755 index 4b1c2b18a9..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .loader import get_loader_by_version diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/loader.py b/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/loader.py deleted file mode 100755 index 6db9db7af6..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/loader.py +++ /dev/null @@ -1,300 +0,0 @@ -import logging -import re -import traceback -from abc import abstractmethod - -from jsonschema import validate, ValidationError -from munch import munchify -from ..common.log import get_cc_logger -from ..common.util import ( - load_json_file, is_valid_bool, is_valid_port, is_true -) -from ..core.exceptions import ConfigException -from ..core.ext import lookup_method -from ..core.models import ( - BasicAuthorization, Request, Processor, - Condition, Task, Checkpoint, IterationMode, - DictToken -) - -_logger = get_cc_logger() - -_PROXY_TYPES = ['http', 'socks4', 'socks5', 'http_no_tunnel'] -_AUTH_TYPES = { - 'basic_auth': BasicAuthorization -} - -_LOGGING_LEVELS = { - 'DEBUG': logging.DEBUG, - 'INFO': logging.INFO, - 'WARNING': logging.WARNING, - 'ERROR': logging.ERROR, - 'FATAL': logging.FATAL, - 'CRITICAL': logging.CRITICAL -} - -# FIXME Make this configurable -_DEFAULT_LOG_LEVEL = 'INFO' - - -class CloudConnectConfigLoader(object): - """The Base cloud connect configuration loader""" - - @staticmethod - def _get_schema_from_file(schema_file): - """ Load JSON based schema definition from schema file path. - :return: A `dict` contains schema. - """ - try: - return load_json_file(schema_file) - except: - raise ConfigException( - 'Cannot load schema from file {}: {}'.format( - schema_file, traceback.format_exc()) - ) - - @abstractmethod - def load(self, definition, schema_file, context): - pass - - -class CloudConnectConfigLoaderV1(CloudConnectConfigLoader): - @staticmethod - def _render_from_dict(source, ctx): - rendered = DictToken(source).render(ctx) - - return dict((k, v.strip() if isinstance(v, basestring) else v) - for k, v in rendered.iteritems()) - - def _load_proxy(self, candidate, variables): - """ - Render and validate proxy setting with given variables. - :param candidate: raw proxy setting as `dict` - :param variables: variables to render template in proxy setting. - :return: A `dict` contains rendered proxy setting. - """ - if not candidate: - return {} - - proxy = self._render_from_dict(candidate, variables) - - enabled = proxy.get('enabled', '0') - if not is_valid_bool(enabled): - raise ValueError( - 'Proxy "enabled" expect to be bool type: {}'.format(enabled) - ) - - proxy['enabled'] = is_true(enabled) - - host, port = proxy.get('host'), proxy.get('port') - - if host or port: - if not host: - raise ValueError('Proxy "host" must not be empty') - - if not is_valid_port(port): - raise ValueError( - 'Proxy "port" expect to be in range [1,65535]: %s' % port - ) - - # proxy type default to 'http' - proxy_type = proxy.get('type') - proxy_type = proxy_type.lower() if proxy_type else 'http' - if proxy_type not in _PROXY_TYPES: - raise ValueError( - 'Proxy "type" expect to be one of [{}]: {}'.format( - ','.join(_PROXY_TYPES), proxy_type) - ) - else: - proxy['type'] = proxy_type - - # proxy rdns default to '0' - proxy_rdns = proxy.get('rdns', '0') - if not is_valid_bool(proxy_rdns): - raise ValueError( - 'Proxy "rdns" expect to be bool type: {}'.format(proxy_rdns) - ) - else: - proxy['rdns'] = is_true(proxy_rdns) - - return proxy - - @staticmethod - def _get_log_level(level_name): - if level_name: - level_name = level_name.upper().strip() - - for k, v in _LOGGING_LEVELS.iteritems(): - if k.startswith(level_name): - return v - - _logger.warning( - 'The log level "%s" is invalid, set it to default: "%s"', - level_name, _DEFAULT_LOG_LEVEL - ) - - return _LOGGING_LEVELS[_DEFAULT_LOG_LEVEL] - - def _load_logging(self, log_setting, variables): - logger = self._render_from_dict(log_setting, variables) - - logger['level'] = self._get_log_level(logger.get('level')) - - return logger - - def _load_global_setting(self, candidate, variables): - """ - Load and render global setting with variables. - :param candidate: Global setting as a `dict` - :param variables: variables from context to render setting - :return: A `Munch` object - """ - candidate = candidate or {} - proxy_setting = self._load_proxy(candidate.get('proxy'), variables) - log_setting = self._load_logging(candidate.get('logging'), variables) - - return munchify({'proxy': proxy_setting, 'logging': log_setting}) - - @staticmethod - def _load_authorization(candidate): - if candidate is None: - return None - auth_type = candidate['type'].lower() - - if auth_type not in _AUTH_TYPES: - raise ValueError( - 'Auth type expect to be one of [{}]: {}'.format( - ','.join(_AUTH_TYPES.keys()), auth_type) - ) - return _AUTH_TYPES[auth_type](candidate['options']) - - def _load_options(self, options): - return Request( - auth=self._load_authorization(options.get('auth')), - url=options['url'], - method=options.get('method', 'GET'), - header=options.get('headers', {}), - body=options.get('body', {}) - ) - - @staticmethod - def _validate_method(method): - if lookup_method(method) is None: - raise ValueError('Unimplemented method: {}'.format(method)) - - def _parse_tasks(self, raw_tasks): - tasks = [] - for item in raw_tasks: - self._validate_method(item['method']) - tasks.append(Task(item['input'], item['method'], item.get('output'))) - return tasks - - def _parse_conditions(self, raw_conditions): - conditions = [] - for item in raw_conditions: - self._validate_method(item['method']) - conditions.append(Condition(item['input'], item['method'])) - return conditions - - @staticmethod - def _load_checkpoint(checkpoint): - if not checkpoint: - return None - return Checkpoint( - checkpoint.get('namespace', []), checkpoint['content']) - - def _load_iteration_mode(self, iteration_mode): - count = iteration_mode.get('iteration_count', '0') - try: - iteration_count = int(count) - except ValueError: - raise ValueError( - '"iteration_count" must be an integer: %s' % count) - - stop_conditions = self._parse_conditions( - iteration_mode['stop_conditions']) - - return IterationMode(iteration_count=iteration_count, - conditions=stop_conditions) - - def _load_processor(self, processor): - skip_conditions = self._parse_conditions( - processor.get('skip_conditions', []) - ) - pipeline = self._parse_tasks(processor.get('pipeline', [])) - return Processor( - skip_conditions=skip_conditions, - pipeline=pipeline - ) - - def _load_request(self, request): - options = self._load_options(request['request']) - - pre_process = self._load_processor(request.get('pre_process', {})) - post_process = self._load_processor(request['post_process']) - checkpoint = self._load_checkpoint(request.get('checkpoint')) - iteration_mode = self._load_iteration_mode(request['iteration_mode']) - - return munchify({ - 'request': options, - 'pre_process': pre_process, - 'post_process': post_process, - 'checkpoint': checkpoint, - 'iteration_mode': iteration_mode, - }) - - def load(self, definition, schema_file, context): - """Load cloud connect configuration from a `dict` and validate - it with schema and global settings will be rendered. - :param schema_file: Schema file location used to validate config. - :param definition: A dictionary contains raw configs. - :param context: variables to render template in global setting. - :return: A `Munch` object. - """ - try: - validate(definition, self._get_schema_from_file(schema_file)) - except ValidationError: - raise ConfigException( - 'Failed to validate interface with schema: {}'.format( - traceback.format_exc())) - - try: - global_settings = self._load_global_setting( - definition.get('global_settings'), context - ) - - requests = [self._load_request(item) for item in definition['requests']] - - return munchify({ - 'meta': munchify(definition['meta']), - 'tokens': definition['tokens'], - 'global_settings': global_settings, - 'requests': requests, - }) - except Exception as ex: - error = 'Unable to load configuration: %s' % str(ex) - _logger.exception(error) - raise ConfigException(error) - - -_loader_and_schema_by_version = { - r'1\.0\.0': (CloudConnectConfigLoaderV1, 'schema_1_0_0.json'), -} - - -def get_loader_by_version(version): - """ Instantiate a configuration loader on basis of a given version. - A `ConfigException` will raised if the version is not supported. - :param version: Version to lookup config loader. - :return: A config loader. - """ - for support_version in _loader_and_schema_by_version: - if re.match(support_version, version): - loader_cls, schema = _loader_and_schema_by_version[support_version] - return loader_cls(), schema - - raise ConfigException( - 'Unsupported schema version {}, current supported' - ' versions should match these regex [{}]'.format(version, ','.join( - _loader_and_schema_by_version)) - ) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/schema_1_0_0.json b/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/schema_1_0_0.json deleted file mode 100755 index 92b80aa08c..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/configuration/schema_1_0_0.json +++ /dev/null @@ -1,344 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "additionalProperties": false, - "definitions": { - "Authentication": { - "additionalProperties": false, - "properties": { - "options": { - "type": "object" - }, - "type": { - "enum": [ - "digest", - "basic_auth" - ], - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "Checkpoint": { - "additionalProperties": false, - "properties": { - "content": { - "type": "object" - }, - "namespace": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "content" - ], - "type": "object" - }, - "GlobalSettings": { - "additionalProperties": false, - "properties": { - "logging": { - "properties": { - "level": { - "type": "string" - } - }, - "type": "object" - }, - "proxy": { - "$ref": "#/definitions/Proxy" - } - }, - "type": "object" - }, - "IterationMode": { - "additionalProperties": false, - "properties": { - "iteration_count": { - "oneOf": [ - { - "pattern": "^[+-]?[1-9]\\d*|0$", - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "stop_conditions": { - "items": { - "additionalProperties": false, - "properties": { - "input": { - "items": { - "type": "string" - }, - "type": "array" - }, - "method": { - "type": "string" - } - }, - "required": [ - "input", - "method" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "Meta": { - "additionalProperties": false, - "properties": { - "apiVersion": { - "pattern": "(?:\\d{1,3}\\.){2}[\\w\\-]{1,15}", - "type": "string" - } - }, - "required": [ - "apiVersion" - ], - "type": "object" - }, - "Proxy": { - "additionalProperties": false, - "properties": { - "enabled": { - "default": false, - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - }, - { - "type": "integer" - } - ] - }, - "host": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "oneOf": [ - { - "type": "string" - }, - { - "exclusiveMaximum": true, - "exclusiveMinimum": true, - "maximum": 65535, - "minimum": 1, - "type": "integer" - } - ] - }, - "rdns": { - "type": "string" - }, - "type": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "required": [ - "host", - "port" - ], - "type": "object" - }, - "Request": { - "additionalProperties": false, - "properties": { - "checkpoint": { - "$ref": "#/definitions/Checkpoint" - }, - "iteration_mode": { - "$ref": "#/definitions/IterationMode" - }, - "post_process": { - "additionalProperties": false, - "properties": { - "pipeline": { - "items": { - "additionalProperties": false, - "properties": { - "input": { - "items": { - "type": "string" - }, - "type": "array" - }, - "method": { - "type": "string" - }, - "output": { - "type": "string" - } - }, - "required": [ - "input", - "method" - ], - "type": "object" - }, - "type": "array" - }, - "skip_conditions": { - "items": { - "additionalProperties": false, - "properties": { - "input": { - "items": { - "type": "string" - }, - "type": "array" - }, - "method": { - "type": "string" - } - }, - "required": [ - "input", - "method" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "pre_process": { - "additionalProperties": false, - "properties": { - "pipeline": { - "items": { - "additionalProperties": false, - "properties": { - "input": { - "items": { - "type": "string" - }, - "type": "array" - }, - "method": { - "type": "string" - }, - "output": { - "type": "string" - } - }, - "required": [ - "input", - "method" - ], - "type": "object" - }, - "type": "array" - }, - "skip_conditions": { - "items": { - "additionalProperties": false, - "properties": { - "input": { - "items": { - "type": "string" - }, - "type": "array" - }, - "method": { - "type": "string" - } - }, - "required": [ - "input", - "method" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "request": { - "additionalProperties": false, - "properties": { - "auth": { - "$ref": "#/definitions/Authentication" - }, - "body": { - "type": "object" - }, - "headers": { - "type": "object" - }, - "method": { - "default": "GET", - "enum": [ - "GET", - "POST" - ], - "type": "string" - }, - "url": { - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "required": [ - "request", - "post_process", - "iteration_mode" - ], - "type": "object" - } - }, - "properties": { - "global_settings": { - "$ref": "#/definitions/GlobalSettings" - }, - "meta": { - "$ref": "#/definitions/Meta" - }, - "requests": { - "items": { - "$ref": "#/definitions/Request" - }, - "minItems": 1, - "type": "array" - }, - "tokens": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "meta", - "tokens", - "requests" - ], - "type": "object" -} diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/__init__.py deleted file mode 100755 index c2424fb1ad..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .engine import CloudConnectEngine -from .exceptions import ConfigException, HTTPError diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/cacerts/ca_certs_locater.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/cacerts/ca_certs_locater.py deleted file mode 100755 index 7d8cd5b8c9..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/cacerts/ca_certs_locater.py +++ /dev/null @@ -1,130 +0,0 @@ -""" -`ca_certs_locater` is a lib for extending httplib2 to allow system certificate store to be used when -verifying SSL certificates, to enable this lib, you should add it to your python import path before -initializing httplib2. As we're not trying to implement SSL certificate RFCs, parsing and validating -certificates are not included. -""" - -import atexit -import os -import os.path as op -import ssl -import sys - -TEMP_CERT_FILE_NAME = 'httplib2_merged_certificates_{}.crt' -LINUX_CERT_PATH_1 = '/etc/pki/tls/certs/ca-bundle.crt' # RedHat -LINUX_CERT_PATH_2 = '/etc/ssl/certs/ca-certificates.crt' # Debian -DARWIN_CERT_PATH = '/usr/local/etc/openssl/cert.pem' -HTTPLIB2_CA_CERT_FILE_NAME = 'cacerts.txt' - -TEMP_CERT_FILE_PATH = None - - -def get(): - """ - Returns: a path to generated certificate authority file - - """ - try: - return _get() - except (IOError, OSError, ssl.SSLError): - _fallback() # IO and SSL relative errors should be swallowed to protect the HTTP request - - -def _get(): - global TEMP_CERT_FILE_PATH - # also check file existence as it's possible for the temp file to be deleted - if TEMP_CERT_FILE_PATH is None or not os.path.exists(TEMP_CERT_FILE_PATH): - temp_cert_file_path = _generate_temp_cert_file_name() - ssl_ca_certs = _read_ssl_default_ca_certs() - if not ssl_ca_certs: - # it's possible the ca load path is not well configured, try some typical paths - ssl_ca_certs = _read_platform_pem_cert_file() - - if ssl_ca_certs: # only update temp cert file when there's additional PEM certs found - cert_files = [ssl_ca_certs, _read_httplib2_default_certs()] - _update_temp_cert_file(temp_cert_file_path, cert_files) - TEMP_CERT_FILE_PATH = temp_cert_file_path - else: - _fallback() - - return TEMP_CERT_FILE_PATH - - -def _fallback(): - """ - Give up the loading process by throwing specified exception, httplib2 will then use its - bundled certificates - """ - raise ImportError('Unable to load system certificate authority files') - - -def _read_platform_pem_cert_file(): - if sys.platform.startswith('linux'): - pem_files = [_read_pem_file(LINUX_CERT_PATH_1), _read_pem_file(LINUX_CERT_PATH_2)] - return '\n'.join(filter(None, pem_files)) - elif sys.platform.startswith('darwin'): - return _read_pem_file(DARWIN_CERT_PATH) - else: - return "" - - -def _read_ssl_default_ca_certs(): - # it's not guaranteed to return PEM formatted certs when `binary_form` is False - der_certs = ssl.create_default_context().get_ca_certs(binary_form=True) - pem_certs = [ssl.DER_cert_to_PEM_cert(der_cert_bytes) for der_cert_bytes in der_certs] - return '\n'.join(pem_certs) - - -def _read_httplib2_default_certs(): - import httplib2 # import error should not happen here, and will be well handled by outer called - httplib_dir = os.path.dirname(os.path.abspath(httplib2.__file__)) - ca_certs_path = os.path.join(httplib_dir, HTTPLIB2_CA_CERT_FILE_NAME) - return _read_pem_file(ca_certs_path) - - -def _read_pem_file(path): - if os.path.exists(path): - with open(path, mode='r') as pem_file: - return pem_file.read() - else: - return "" - - -def _update_temp_cert_file(temp_file, pem_texts): - with open(temp_file, mode='w') as temp_cert_file: - for pem_text in pem_texts: - if len(pem_text) > 0: - temp_cert_file.write(pem_text + '\n') - temp_cert_file.flush() - atexit.register(_do_safe_remove, temp_file) - - -def _do_safe_remove(file_path): - if os.path.exists(file_path): - try: - os.remove(file_path) - except: - pass - - -def _get_temp_cert_file_dir(): - import __main__ - app_root = op.dirname(op.dirname(op.abspath(__main__.__file__))) - - temp_dir = op.join(app_root, 'temp_certs') - if not op.isdir(temp_dir): - try: - os.mkdir(temp_dir) - except: - pass - for candidate in ['temp_certs', 'local', 'default']: - dir_path = op.join(app_root, candidate) - if op.isdir(dir_path): - return dir_path - return app_root - - -def _generate_temp_cert_file_name(): - file_name = TEMP_CERT_FILE_NAME.format(os.getpid()) - return os.path.join(_get_temp_cert_file_dir(), file_name) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/defaults.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/defaults.py deleted file mode 100755 index 84d7989722..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/defaults.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Default config for cloud connect""" - -timeout = 120 # request timeout is two minutes - -disable_ssl_cert_validation = False # default enable SSL validation - -success_statuses = (200, 201) # statuses be treated as success. - -# response status which need to retry. -retry_statuses = (429, 500, 501, 502, 503, 504, 505, 506, 507, - 509, 510, 511) - -# response status which need print a warning log. -warning_statuses = (203, 204, 205, 206, 207, 208, 226, - 300, 301, 302, 303, 304, 305, 306, 307, 308) -retries = 3 # Default maximum retry times. - -max_iteration_count = 100 # maximum iteration loop count - -charset = 'utf-8' # Default response charset if not found in response header diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/engine.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/engine.py deleted file mode 100755 index 9b267273fa..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/engine.py +++ /dev/null @@ -1,326 +0,0 @@ -import json -import threading - -from . import defaults -from .exceptions import HTTPError, StopCCEIteration -from .http import HTTPRequest -from ..common.log import get_cc_logger - -_logger = get_cc_logger() - - -class CloudConnectEngine(object): - """The cloud connect engine to process request instantiated - from user options.""" - - def __init__(self): - self._stopped = False - self._running_job = None - - @staticmethod - def _set_logging(log_setting): - _logger.set_level(log_setting.level) - - def start(self, context, config, checkpoint_mgr): - """Start current client instance to execute each request parsed - from config. - """ - if not config: - raise ValueError('Config must not be empty') - - context = context or {} - global_setting = config.global_settings - - CloudConnectEngine._set_logging(global_setting.logging) - - _logger.info('Start to execute requests jobs.') - processed = 0 - - for request in config.requests: - job = Job( - request=request, - context=context, - checkpoint_mgr=checkpoint_mgr, - proxy=global_setting.proxy, - ) - self._running_job = job - job.run() - - processed += 1 - _logger.info('%s job(s) process finished', processed) - - if self._stopped: - _logger.info( - 'Engine has been stopped, stopping to execute jobs.') - break - - self._stopped = True - _logger.info('Engine executing finished') - - def stop(self): - """Stops engine and running job. Do nothing if engine already - been stopped.""" - if self._stopped: - _logger.info('Engine already stopped, do nothing.') - return - - _logger.info('Stopping engine') - - if self._running_job: - _logger.info('Attempting to stop the running job.') - self._running_job.terminate() - _logger.info('Stopping job finished.') - - self._stopped = True - - -class Job(object): - """Job class represents a single request to send HTTP request until - reached it's stop condition. - """ - - def __init__(self, request, context, checkpoint_mgr, proxy=None): - """ - Constructs a `Job` with properties request, context and a - optional proxy setting. - :param request: A `Request` instance which contains request settings. - :param context: A values set contains initial values for template - variables. - :param proxy: A optional `Proxy` object contains proxy related - settings. - """ - self._request = request - self._context = context - self._checkpoint_mgr = checkpoint_mgr - self._client = HTTPRequest(proxy) - self._stopped = True - self._should_stop = False - - self._request_iterated_count = 0 - self._iteration_mode = self._request.iteration_mode - self._max_iteration_count = self._get_max_iteration_count() - - self._running_thread = None - self._terminated = threading.Event() - - def _get_max_iteration_count(self): - mode_max_count = self._iteration_mode.iteration_count - default_max_count = defaults.max_iteration_count - return min(default_max_count, mode_max_count) \ - if mode_max_count > 0 else default_max_count - - def terminate(self, block=True, timeout=30): - """Terminate this job, the current thread will blocked util - the job is terminate finished if block is True """ - if self.is_stopped(): - _logger.info('Job already been stopped.') - return - - if self._running_thread == threading.current_thread(): - _logger.warning('Job cannot terminate itself.') - return - - _logger.info('Stopping job') - self._should_stop = True - - if not block: - return - if not self._terminated.wait(timeout): - _logger.warning('Terminating job timeout.') - - def _set_context(self, key, value): - self._context[key] = value - - def _execute_tasks(self, tasks): - if not tasks: - return - for task in tasks: - if self._check_should_stop(): - return - self._context.update(task.execute(self._context)) - - def _on_pre_process(self): - """ - Execute tasks in pre process one by one if condition satisfied. - """ - pre_processor = self._request.pre_process - - if pre_processor.should_skipped(self._context): - _logger.info('Skip pre process condition satisfied, do nothing') - return - - tasks = pre_processor.pipeline - _logger.debug( - 'Got %s tasks need be executed before process', len(tasks)) - self._execute_tasks(tasks) - - def _on_post_process(self): - """ - Execute tasks in post process one by one if condition satisfied. - """ - post_processor = self._request.post_process - - if post_processor.should_skipped(self._context): - _logger.info('Skip post process condition satisfied, ' - 'do nothing') - return - - tasks = post_processor.pipeline - _logger.debug( - 'Got %s tasks need to be executed after process', len(tasks) - ) - self._execute_tasks(tasks) - - def _update_checkpoint(self): - """Updates checkpoint based on checkpoint namespace and content.""" - checkpoint = self._request.checkpoint - if not checkpoint: - _logger.info('Checkpoint not specified, do not update it.') - return - - self._checkpoint_mgr.update_ckpt( - checkpoint.normalize_content(self._context), - namespaces=checkpoint.normalize_namespace(self._context), - ) - - def _get_checkpoint(self): - checkpoint = self._request.checkpoint - if not checkpoint: - _logger.info('Checkpoint not specified, do not read it.') - return - - namespaces = checkpoint.normalize_namespace(self._context) - checkpoint = self._checkpoint_mgr.get_ckpt(namespaces) - if checkpoint: - self._context.update(checkpoint) - - def _is_stoppable(self): - """Check if repeat mode conditions satisfied.""" - if self._request_iterated_count >= self._max_iteration_count: - _logger.info( - 'Job iteration count is %s, current request count is %s,' - ' stop condition satisfied.', - self._max_iteration_count, self._request_iterated_count - ) - return True - - if self._iteration_mode.passed(self._context): - _logger.info('Job stop condition satisfied.') - return True - - return False - - def is_stopped(self): - """Return if this job is stopped.""" - return self._stopped - - def run(self): - """Start job and exit util meet stop condition. """ - _logger.info('Start to process job') - - self._stopped = False - try: - self._running_thread = threading.current_thread() - self._run() - except Exception: - _logger.exception('Error encountered while running job.') - raise - finally: - self._terminated.set() - self._stopped = True - - _logger.info('Job processing finished') - - def _check_should_stop(self): - if self._should_stop: - _logger.info('Job should been stopped.') - return self._should_stop - - def _run(self): - request = self._request.request - method = request.method - authorizer = request.auth - self._get_checkpoint() - - while 1: - if self._check_should_stop(): - return - - try: - self._on_pre_process() - except StopCCEIteration: - _logger.info('Stop iteration command in pre process is received, exit job now.') - return - - url = request.normalize_url(self._context) - header = request.normalize_header(self._context) - body = request.normalize_body(self._context) - body_json = json.dumps(body) if body else None - - if authorizer: - authorizer(header, self._context) - - if self._check_should_stop(): - return - - response, need_terminate = \ - self._send_request(url, method, header, body=body_json) - - if need_terminate: - _logger.info('This job need to be terminated.') - break - - self._request_iterated_count += 1 - self._set_context('__response__', response) - if self._check_should_stop(): - return - - try: - self._on_post_process() - except StopCCEIteration: - _logger.info('Stop iteration command in post process is received, exit job now.') - return - - if self._check_should_stop(): - return - self._update_checkpoint() - - if self._is_stoppable(): - _logger.info('Stop condition reached, exit job now') - break - - def _send_request(self, url, method, header, body): - """Do send request with a simple error handling strategy.""" - try: - response = self._client.request( - url, method, headers=header, body=body - ) - except HTTPError as error: - _logger.exception( - 'HTTPError reason=%s when sending request to ' - 'url=%s method=%s', error.reason, url, method) - return None, True - - status = response.status_code - - if status in defaults.success_statuses: - if not (response.body or '').strip(): - _logger.info( - 'The response body of request which url=%s and' - ' method=%s is empty, status=%s.', - url, method, status - ) - return None, True - return response, False - - error_log = ('The response status=%s for request which url=%s and' - ' method=%s.') % ( - status, url, method - ) - - if status in defaults.warning_statuses: - _logger.warning(error_log) - else: - _logger.error(error_log) - - return None, True diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/exceptions.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/exceptions.py deleted file mode 100755 index ebe30cae7d..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/exceptions.py +++ /dev/null @@ -1,27 +0,0 @@ -"""APP Cloud Connect errors""" - - -class ConfigException(Exception): - """Config exception""" - pass - - -class FuncException(Exception): - """Ext function call exception""" - pass - - -class HTTPError(Exception): - """ HTTPError raised when HTTP request returned a error.""" - - def __init__(self, reason=None): - """ - Initialize HTTPError with `response` object and `status`. - """ - self.reason = reason - super(HTTPError, self).__init__(reason) - - -class StopCCEIteration(Exception): - """Exception to exit from the engine iteration.""" - pass diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/ext.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/ext.py deleted file mode 100755 index 72bce1dc61..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/ext.py +++ /dev/null @@ -1,336 +0,0 @@ -import calendar -import json -import re -import traceback -from datetime import datetime - -from jsonpath_rw import parse -from .exceptions import FuncException, StopCCEIteration -from .pipemgr import PipeManager -from ..common import util, log - -_logger = log.get_cc_logger() - - -def regex_match(pattern, source, flags=0): - """ - Determine whether a string is match a regex pattern. - - :param pattern: regex pattern - :param source: candidate to match regex - :param flags: flags for regex match - :return: `True` if candidate match pattern else `False` - """ - try: - return re.match(pattern, source, flags) is not None - except Exception: - _logger.warning( - 'Unable to match source with pattern=%s, cause=%s', - pattern, - traceback.format_exc() - ) - return False - - -def regex_not_match(pattern, source, flags=0): - """ - Determine whether a string is not match a regex pattern. - - :param pattern: regex expression - :param source: candidate to match regex - :param flags: flags for regex match - :return: `True` if candidate not match pattern else `False` - """ - return not regex_match(pattern, source, flags) - - -def json_path(source, json_path_expr): - """ Extract value from string with JSONPATH expression. - :param json_path_expr: JSONPATH expression - :param source: string to extract value - :return: A `list` contains all values extracted - """ - if not source: - _logger.debug('source to apply JSONPATH is empty, return empty.') - return '' - - if isinstance(source, basestring): - _logger.debug( - 'source expected is a JSON, not %s. Attempt to' - ' convert it to JSON', - type(source) - ) - try: - source = json.loads(source) - except Exception as ex: - _logger.warning( - 'Unable to load JSON from source: %s. ' - 'Attempt to apply JSONPATH "%s" on source directly.', - ex.message, - json_path_expr - ) - - try: - expression = parse(json_path_expr) - results = [match.value for match in expression.find(source)] - - _logger.debug( - 'Got %s elements extracted with JSONPATH expression "%s"', - len(results), json_path_expr - ) - - if not results: - return '' - - return results[0] or '' if len(results) == 1 else results - except Exception as ex: - _logger.warning( - 'Unable to apply JSONPATH expression "%s" on source,' - ' message=%s cause=%s', - json_path_expr, - ex.message, - traceback.format_exc() - ) - return '' - - -def splunk_xml(candidates, - time=None, - index=None, - host=None, - source=None, - sourcetype=None): - """ Wrap a event with splunk xml format. - :param candidates: data used to wrap as event - :param time: timestamp which must be empty or a valid float - :param index: index name for event - :param host: host for event - :param source: source for event - :param sourcetype: sourcetype for event - :return: A wrapped event with splunk xml format. - """ - if not isinstance(candidates, (list, tuple)): - candidates = [candidates] - - time = time or None - if time: - try: - time = float(time) - except ValueError: - _logger.warning( - '"time" %s is expected to be a float, set "time" to None', - time - ) - time = None - - return util.format_events( - candidates, - time=time, - index=index, - host=host, - source=source, - sourcetype=sourcetype - ) - - -def std_output(candidates): - """ Output a string to stdout. - :param candidates: List of string to output to stdout or a single string. - """ - if isinstance(candidates, basestring): - candidates = [candidates] - - all_str = True - for candidate in candidates: - if all_str and not isinstance(candidate, basestring): - all_str = False - _logger.warning( - 'The type of data needs to print is "%s" rather than' - ' basestring', - type(candidate) - ) - - if not PipeManager().write_events(candidate): - raise FuncException('Fail to output data to stdout. The event' - ' writer is stopped or encountered exception') - - _logger.debug('Writing events to stdout finished.') - return True - - -def _parse_json(source, json_path_expr=None): - if not source: - _logger.debug('Unable to parse JSON from empty source, return empty.') - return {} - - if json_path_expr: - _logger.debug( - 'Try to extract JSON from source with JSONPATH expression: %s, ', - json_path_expr - ) - source = json_path(source, json_path_expr) - - elif isinstance(source, basestring): - source = json.loads(source) - - return source - - -def json_empty(source, json_path_expr=None): - """Check whether a JSON is empty, return True only if the JSON to - check is a valid JSON and is empty. - :param json_path_expr: A optional JSONPATH expression - :param source: source to extract JSON - :return: `True` if the result JSON is empty - """ - try: - data = _parse_json(source, json_path_expr) - - if isinstance(data, (list, tuple)): - return all(len(ele) == 0 for ele in data) - return len(data) == 0 - except Exception as ex: - _logger.warning( - 'Unable to determine whether source is json_empty, treat it as ' - 'not json_empty: %s', ex.message - ) - return False - - -def json_not_empty(source, json_path_expr=None): - """Check if a JSON object is not empty, return True only if the - source is a valid JSON object and the value leading by - json_path_expr is empty. - :param json_path_expr: A optional JSONPATH expression - :param source: source to extract JSON - :return: `True` if the result JSON is not empty - """ - try: - data = _parse_json(source, json_path_expr) - - if isinstance(data, (list, tuple)): - return any(len(ele) > 0 for ele in data) - return len(data) > 0 - except Exception as ex: - _logger.warning( - 'Unable to determine whether source is json_not_empty, ' - 'treat it as not json_not_empty: %s', - ex.message - ) - return False - - -def set_var(value): - """Set a variable which name should be specified in `output` with value""" - return value - - -def _fix_microsecond_format(fmt, micros): - """ - implement %Nf so that user can control the digital number of microsecond. - If number of % is even, don't do replacement. - If N is not in [1-6], don't do replacement. - If time length m is less than N, convert it to 6 digitals and return N - digitals. - """ - micros = str(micros).zfill(6) - - def do_replacement(x, micros): - if int(x.group(1)) in range(1, 7) and len(x.group()) % 2: - return x.group().replace('%' + x.group(1) + 'f', - micros[:min(int(x.group(1)), len(micros))]) - return x.group() - - return re.sub(r'%+([1-6])f', lambda x: do_replacement(x, micros), fmt) - - -def _fix_timestamp_format(fmt, timestamp): - """Replace '%s' in time format with timestamp if the number - of '%' before 's' is odd.""" - return re.sub( - r'%+s', - ( - lambda x: - x.group() if len(x.group()) % 2 else x.group().replace('%s', - timestamp) - ), - fmt - ) - - -def time_str2str(date_string, from_format, to_format): - """Convert a date string with given format to another format. Return - the original date string if it's type is not string or failed to parse or - convert it with format.""" - if not isinstance(date_string, basestring): - _logger.warning( - '"date_string" must be a string type, found %s,' - ' return the original date_string directly.', - type(date_string) - ) - return date_string - - try: - dt = datetime.strptime(date_string, from_format) - # Need to pre process '%s' in to_format here because '%s' is not - # available on all platforms. Even on supported platforms, the - # result may be different because it depends on implementation on each - # platform. Replace it with UTC timestamp here directly. - if to_format: - timestamp = calendar.timegm(dt.timetuple()) - to_format = _fix_timestamp_format(to_format, str(timestamp)) - to_format = _fix_microsecond_format(to_format, str(dt.microsecond)) - return dt.strftime(to_format) - except Exception: - _logger.warning( - 'Unable to convert date_string "%s" from format "%s" to "%s",' - ' return the original date_string, cause=%s', - date_string, - from_format, - to_format, - traceback.format_exc() - ) - return date_string - - -def is_true(value): - """Determine whether value is True""" - return str(value).strip().lower() == 'true' - - -def exit_if_true(value): - """Raise a StopCCEIteration exception if value is True""" - if is_true(value): - raise StopCCEIteration - - -def assert_true(value, message=None): - """Assert value is True""" - if not is_true(value): - raise AssertionError( - message or '"{value}" is not true'.format(value=value) - ) - - -_extension_functions = { - 'assert_true': assert_true, - 'exit_if_true': exit_if_true, - 'is_true': is_true, - 'regex_match': regex_match, - 'regex_not_match': regex_not_match, - 'set_var': set_var, - 'splunk_xml': splunk_xml, - 'std_output': std_output, - 'json_path': json_path, - 'json_empty': json_empty, - 'json_not_empty': json_not_empty, - 'time_str2str': time_str2str, -} - - -def lookup_method(name): - """ Find a predefined function with given function name. - :param name: function name. - :return: A function with given name. - """ - return _extension_functions.get(name) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/http.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/http.py deleted file mode 100755 index b7cd2dc94e..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/http.py +++ /dev/null @@ -1,234 +0,0 @@ -import time -import traceback - -from httplib2 import ProxyInfo, Http, socks, SSLHandshakeError -from solnlib.packages.requests import PreparedRequest, utils -from . import defaults -from .exceptions import HTTPError -from ..common.log import get_cc_logger - -_logger = get_cc_logger() - - -class HTTPResponse(object): - """ - HTTPResponse class wraps response of HTTP request for later use. - """ - - def __init__(self, response, content): - """Construct a HTTPResponse from response and content returned - with httplib2 request""" - self._status_code = response.status - self._header = response - self._body = self._decode_content(response, content) - - @staticmethod - def _decode_content(response, content): - if not content: - return '' - - charset = utils.get_encoding_from_headers(response) - - if charset is None: - charset = defaults.charset - _logger.info( - 'Unable to find charset in response headers,' - ' set it to default "%s"', charset - ) - - _logger.info('Decoding response content with charset=%s', charset) - - try: - return content.decode(charset, errors='replace') - except Exception as ex: - _logger.warning( - 'Failure decoding response content with charset=%s,' - ' decode it with utf-8: %s', - charset, ex.message - ) - - return content.decode('utf-8', errors='replace') - - @property - def header(self): - return self._header - - @property - def body(self): - """ - Return response body as a `string`. - :return: A `string` - """ - return self._body - - @property - def status_code(self): - """ - Return response status code. - :return: A `integer` - """ - return self._status_code - - -def _make_prepare_url_func(): - """Expose prepare_url in `PreparedRequest`""" - pr = PreparedRequest() - - def prepare_url(url, params=None): - """Prepare the given HTTP URL with ability provided in requests lib. - For some illegal characters in URL or parameters like space(' ') will - be escaped to make sure we can request the correct URL.""" - pr.prepare_url(url, params=params) - return pr.url - - return prepare_url - - -class HTTPRequest(object): - """ - HTTPRequest class represents a single request to send HTTP request until - reached it's stop condition. - """ - - _PROXY_TYPE = { - 'http': socks.PROXY_TYPE_HTTP, - 'http_no_tunnel': socks.PROXY_TYPE_HTTP_NO_TUNNEL, - 'socks4': socks.PROXY_TYPE_SOCKS4, - 'socks5': socks.PROXY_TYPE_SOCKS5, - } - - def __init__(self, proxy=None): - """Constructs a `HTTPRequest` with a optional proxy setting. - :param proxy: A optional `Proxy` object contains proxy related - settings. - """ - self._proxy_info = self._prepare_proxy_info(proxy) - self._connection = None - self._prepare_url_func = _make_prepare_url_func() - - def _send_request(self, uri, method, headers=None, body=None): - """Do send request to target URL and validate SSL cert by default. - If validation failed, disable it and try again.""" - if self._connection is None: - self._connection = self._build_http_connection( - proxy_info=self._proxy_info, - disable_ssl_cert_validation=False) - - try: - return self._connection.request( - uri, body=body, method=method, headers=headers - ) - except SSLHandshakeError: - _logger.warning( - "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verification failed. " - "The certificate of the https server [%s] is not trusted, " - "this add-on will proceed to connect with this certificate. " - "You may need to check the certificate and " - "refer to the documentation and add it to the trust list. %s", - uri, - traceback.format_exc() - ) - - self._connection = self._build_http_connection( - proxy_info=self._proxy_info, - disable_ssl_cert_validation=True - ) - return self._connection.request( - uri, body=body, method=method, headers=headers - ) - - def request(self, url, method='GET', headers=None, body=None): - """ - Invoke a request with httplib2 and return it's response. - :param url: url address to send request to. - :param method: request method `GET` by default. - :param headers: request headers. - :param body: request body. - :return: A `HTTPResponse` object. - """ - - if body and not isinstance(body, str): - raise TypeError('Request body type must be str') - - if self._connection is None: - self._connection = self._build_http_connection(self._proxy_info) - - try: - uri = self._prepare_url_func(url) - except Exception: - _logger.warning( - 'Failed to encode url=%s: %s, use original url directly', - url, traceback.format_exc() - ) - uri = url - - _logger.info('Preparing to invoke request to [%s]', uri) - - result = self._do_request(uri, method, headers, body) - - _logger.info('Invoking request to [%s] finished', uri) - - return result - - def _prepare_proxy_info(self, proxy): - if not proxy or not proxy.enabled: - _logger.debug('Proxy is not enabled') - return None - - username = proxy.username \ - if 'username' in proxy and proxy.username else None - password = proxy.password \ - if 'password' in proxy and proxy.password else None - - proxy_type = self._PROXY_TYPE.get(proxy.type) or self._PROXY_TYPE['http'] - - return ProxyInfo(proxy_host=proxy.host, - proxy_port=int(proxy.port), - proxy_type=proxy_type, - proxy_user=username, - proxy_pass=password, - proxy_rdns=proxy.rdns) - - @staticmethod - def _build_http_connection( - proxy_info=None, - timeout=defaults.timeout, - disable_ssl_cert_validation=defaults.disable_ssl_cert_validation): - return Http( - proxy_info=proxy_info, - timeout=timeout, - disable_ssl_certificate_validation=disable_ssl_cert_validation) - - @staticmethod - def _is_need_retry(status, retried, maximum_retries): - return retried < maximum_retries \ - and status in defaults.retry_statuses - - def _do_request(self, uri, method='GET', headers=None, body=None): - """Invokes request and auto retry with an exponential backoff - if the response status is configured in defaults.retry_statuses.""" - retries = max(defaults.retries, 0) - - for i in xrange(retries + 1): - try: - response, content = self._send_request( - uri, body=body, method=method, headers=headers - ) - except Exception as err: - _logger.exception( - 'Could not send request url=%s method=%s', uri, method) - raise HTTPError('HTTP Error %s' % str(err)) - - status = response.status - - if self._is_need_retry(status, i, retries): - delay = 2 ** i - _logger.warning( - 'The response status=%s of request which url=%s and' - ' method=%s. Retry after %s seconds.', - status, uri, method, delay, - ) - time.sleep(delay) - continue - - return HTTPResponse(response, content) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/models.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/models.py deleted file mode 100755 index f49303a469..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/models.py +++ /dev/null @@ -1,277 +0,0 @@ -import base64 -import traceback - -from .ext import lookup_method -from .template import compile_template -from ..common.log import get_cc_logger - -_logger = get_cc_logger() - - -class _Token(object): - """Token class wraps a template expression""" - - def __init__(self, source): - """Constructs _Token from source. A rendered template - will be created if source is string type because Jinja - template must be a string.""" - self._source = source - self._value_for = compile_template(source) \ - if isinstance(source, basestring) else None - - def render(self, variables): - """Render value with variables if source is a string. - Otherwise return source directly.""" - if self._value_for is None: - return self._source - try: - return self._value_for(variables) - except Exception as ex: - _logger.warning( - 'Unable to render template "%s". Please make sure template is' - ' a valid Jinja2 template and token is exist in variables. ' - 'message=%s cause=%s', - self._source, - ex.message, - traceback.format_exc() - ) - return self._source - - -class DictToken(object): - """DictToken wraps a dict which value is template expression""" - - def __init__(self, template_expr): - self._tokens = {k: _Token(v) - for k, v in (template_expr or {}).iteritems()} - - def render(self, variables): - return {k: v.render(variables) for k, v in self._tokens.iteritems()} - - -class BaseAuth(object): - """A base class for all authorization classes""" - - def __call__(self, headers, context): - raise NotImplementedError('Auth must be callable.') - - -class BasicAuthorization(BaseAuth): - """BasicAuthorization class implements basic auth""" - - def __init__(self, options): - if not options: - raise ValueError('Options for basic auth unexpected to be empty') - - username = options.get('username') - if not username: - raise ValueError('Username is mandatory for basic auth') - password = options.get('password') - if not password: - raise ValueError('Password is mandatory for basic auth') - - self._username = _Token(username) - self._password = _Token(password) - - def __call__(self, headers, context): - username = self._username.render(context) - password = self._password.render(context) - headers['Authorization'] = 'Basic %s' % base64.encodestring( - username + ':' + password - ).strip() - - -class Request(object): - def __init__(self, url, method, header=None, auth=None, body=None): - self._header = DictToken(header) - self._url = _Token(url) - self._method = method.upper() - self._auth = auth - self._body = DictToken(body) - - @property - def header(self): - return self._header - - @property - def url(self): - return self._url - - @property - def method(self): - return self._method - - @property - def auth(self): - return self._auth - - @property - def body(self): - return self._body - - def normalize_url(self, context): - """Normalize url""" - return self._url.render(context) - - def normalize_header(self, context): - """Normalize headers which must be a dict which keys and values are - string.""" - header = self.header.render(context) - return {k: str(v) for k, v in header.iteritems()} - - def normalize_body(self, context): - """Normalize body""" - return self.body.render(context) - - -class _Function(object): - def __init__(self, inputs, function): - self._inputs = tuple(_Token(expr) for expr in inputs or []) - self._function = function - - @property - def inputs(self): - return self._inputs - - def inputs_values(self, context): - """ - Get rendered input values. - """ - for arg in self._inputs: - yield arg.render(context) - - @property - def function(self): - return self._function - - -class Task(_Function): - """Task class wraps a task in processor pipeline""" - - def __init__(self, inputs, function, output=None): - super(Task, self).__init__(inputs, function) - self._output = output - - @property - def output(self): - return self._output - - def execute(self, context): - """Execute task with arguments which rendered from context """ - args = [arg for arg in self.inputs_values(context)] - caller = lookup_method(self.function) - output = self._output - - _logger.info( - 'Executing task method: [%s], input size: [%s], output: [%s]', - self.function, len(args), output - ) - - if output is None: - caller(*args) - return {} - - return {output: caller(*args)} - - -class Condition(_Function): - """A condition return the value calculated from input and function""" - - def calculate(self, context): - """Calculate condition with input arguments rendered from context - and method which expected return a bool result. - :param context: context contains key value pairs - :return A bool value returned from the corresponding method - """ - args = [arg for arg in self.inputs_values(context)] - callable_method = lookup_method(self.function) - - _logger.debug( - 'Calculating condition with method: [%s], input size: [%s]', - self.function, len(args) - ) - - result = callable_method(*args) - - _logger.debug("Calculated result: %s", result) - - return result - - -class _Conditional(object): - """A base class for all conditional action""" - - def __init__(self, conditions): - self._conditions = conditions or [] - - @property - def conditions(self): - return self._conditions - - def passed(self, context): - """Determine if any condition is satisfied. - :param context: variables to render template - :return: `True` if all passed else `False` - """ - return any( - condition.calculate(context) for condition in self._conditions - ) - - -class Processor(_Conditional): - """Processor class contains a conditional data process pipeline""" - - def __init__(self, skip_conditions, pipeline): - super(Processor, self).__init__(skip_conditions) - self._pipeline = pipeline or [] - - @property - def pipeline(self): - return self._pipeline - - def should_skipped(self, context): - """Determine processor if should skip process""" - return self.passed(context) - - -class IterationMode(_Conditional): - def __init__(self, iteration_count, conditions): - super(IterationMode, self).__init__(conditions) - self._iteration_count = iteration_count - - @property - def iteration_count(self): - return self._iteration_count - - @property - def conditions(self): - return self._conditions - - -class Checkpoint(object): - """A checkpoint includes a namespace to determine the checkpoint location - and a content defined the format of content stored in checkpoint.""" - - def __init__(self, namespace, content): - """Constructs checkpoint with given namespace and content template. """ - if not content: - raise ValueError('Checkpoint content must not be empty') - - self._namespace = tuple(_Token(expr) for expr in namespace or ()) - self._content = DictToken(content) - - @property - def namespace(self): - return self._namespace - - def normalize_namespace(self, ctx): - """Normalize namespace with context used to render template.""" - return [token.render(ctx) for token in self._namespace] - - @property - def content(self): - return self._content - - def normalize_content(self, ctx): - """Normalize checkpoint with context used to render template.""" - return self._content.render(ctx) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/pipemgr.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/pipemgr.py deleted file mode 100755 index e696695891..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/pipemgr.py +++ /dev/null @@ -1,14 +0,0 @@ -from solnlib.pattern import Singleton - - -class PipeManager(object): - __metaclass__ = Singleton - - def __init__(self, event_writer=None): - self._event_writer = event_writer - - def write_events(self, events): - if not self._event_writer: - print events - return True - return self._event_writer.write_events(events) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/core/template.py b/package/bin/da_ess_contentupdate/cloudconnectlib/core/template.py deleted file mode 100755 index 8cef6e90f3..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/core/template.py +++ /dev/null @@ -1,20 +0,0 @@ -from jinja2 import Template -import re - -# This pattern matches the template with only one token inside like "{{ -# token1}}", "{{ token2 }" -PATTERN = re.compile(r"^\{\{\s*(\w+)\s*\}\}$") - - -def compile_template(template): - _origin_template = template - _template = Template(template) - - def translate_internal(context): - match = re.match(PATTERN, _origin_template) - if match: - context_var = context.get(match.groups()[0]) - return context_var if context_var else '' - return _template.render(context) - - return translate_internal diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py deleted file mode 100755 index 4bd09f774f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/cloud_connect_mod_input.py +++ /dev/null @@ -1,71 +0,0 @@ -import ConfigParser -import os.path as op - -from .data_collection import ta_mod_input as ta_input -from .ta_cloud_connect_client import TACloudConnectClient as CollectorCls -from ..common.lib_util import ( - get_main_file, get_app_root_dir, get_mod_input_script_name -) - - -def _load_options_from_inputs_spec(app_root, stanza_name): - input_spec_file = 'inputs.conf.spec' - file_path = op.join(app_root, 'README', input_spec_file) - - if not op.isfile(file_path): - raise RuntimeError("README/%s doesn't exist" % input_spec_file) - - parser = ConfigParser.RawConfigParser(allow_no_value=True) - parser.read(file_path) - options = parser.defaults().keys() - stanza_prefix = '%s://' % stanza_name - - stanza_exist = False - for section in parser.sections(): - if section == stanza_name or section.startswith(stanza_prefix): - options.extend(parser.options(section)) - stanza_exist = True - if not stanza_exist: - raise RuntimeError("Stanza %s doesn't exist" % stanza_name) - return set(options) - - -def _find_ucc_global_config_json(app_root, ucc_config_filename): - """Find UCC config file from all possible directories""" - candidates = ['local', 'default', 'bin', - op.join('appserver', 'static', 'js', 'build')] - - for candidate in candidates: - file_path = op.join(app_root, candidate, ucc_config_filename) - if op.isfile(file_path): - return file_path - raise RuntimeError( - 'Unable to load %s from [%s]' - % (ucc_config_filename, ','.join(candidates)) - ) - - -def _get_cloud_connect_config_json(script_name): - config_file_name = '.'.join([script_name, 'cc.json']) - return op.join(op.dirname(get_main_file()), config_file_name) - - -def run(single_instance=False): - script_name = get_mod_input_script_name() - - cce_config_file = _get_cloud_connect_config_json(script_name) - - app_root = get_app_root_dir() - ucc_config_path = _find_ucc_global_config_json( - app_root, 'globalConfig.json' - ) - - schema_params = _load_options_from_inputs_spec(app_root, script_name) - ta_input.main( - CollectorCls, - schema_file_path=ucc_config_path, - log_suffix=script_name, - cc_json_file=cce_config_file, - schema_para_list=schema_params, - single_instance=single_instance - ) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/__init__.py deleted file mode 100755 index a628703818..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -import json -import hashlib - - -def load_schema_file(schema_file): - """ - Load schema file. - """ - - with open(schema_file) as f: - ret = json.load(f) - - common = ret.get("_common_", dict()) - if common: - for k, v in ret.items(): - if k == "_common_" or not isinstance(v, dict): - continue - # merge common into other values - for _k, _v in common.items(): - if _k not in v: - v[_k] = _v - ret[k] = v - - return ret - - -def md5_of_dict(data): - """ - MD5 of dict data. - """ - - md5 = hashlib.sha256() - if isinstance(data, dict): - for key in sorted(data.keys()): - md5.update(repr(key)) - md5.update(md5_of_dict(data[key])) - elif isinstance(data, list): - for item in sorted(data): - md5.update(md5_of_dict(item)) - else: - md5.update(repr(data)) - - return md5.hexdigest() - - -class UCCException(Exception): - """ - Dispatch engine exception. - """ - - pass - diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/log.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/log.py deleted file mode 100755 index 0379e69021..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/log.py +++ /dev/null @@ -1,49 +0,0 @@ -import logging -from ...splunktalib.common import log as stclog - - -def set_log_level(log_level): - """ - Set log level. - """ - - if isinstance(log_level, basestring): - if log_level.upper() == "DEBUG": - stclog.Logs().set_level(logging.DEBUG) - elif log_level.upper() == "INFO": - stclog.Logs().set_level(logging.INFO) - elif log_level.upper() == "WARN": - stclog.Logs().set_level(logging.WARN) - elif log_level.upper() == "ERROR": - stclog.Logs().set_level(logging.ERROR) - elif log_level.upper() == "WARNING": - stclog.Logs().set_level(logging.WARNING) - elif log_level.upper() == "CRITICAL": - stclog.Logs().set_level(logging.CRITICAL) - else: - stclog.Logs().set_level(logging.INFO) - elif isinstance(log_level, int): - if log_level in [logging.DEBUG, logging.INFO, logging.ERROR, - logging.WARN, logging.WARNING, logging.CRITICAL]: - stclog.Logs().set_level(log_level) - else: - stclog.Logs().set_level(logging.INFO) - else: - stclog.Logs().set_level(logging.INFO) - - -# Global logger -logger = stclog.Logs().get_logger("cloud_connect_engine") - - -def reset_logger(name): - """ - Reset logger. - """ - - stclog.reset_logger(name) - - global logger - logger = stclog.Logs().get_logger(name) - - diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/rwlock.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/rwlock.py deleted file mode 100755 index b1e43fe258..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/rwlock.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -This module provides Read-Write lock. -""" - -import threading - - -class _ReadLocker(object): - def __init__(self, lock): - self.lock = lock - - def __enter__(self): - self.lock.acquire_read() - - def __exit__(self, exc_type, exc_val, exc_tb): - self.lock.release_read() - return False - - -class _WriteLocker(object): - def __init__(self, lock): - self.lock = lock - - def __enter__(self): - self.lock.acquire_write() - - def __exit__(self, exc_type, exc_val, exc_tb): - self.lock.release_write() - return False - - -class RWLock(object): - """ Simple Read-Write lock. - - Allow multiple read but only one writing concurrently. - """ - - def __init__(self): - self._condition = threading.Condition(threading.Lock()) - self._readers = 0 - - def acquire_read(self): - self._condition.acquire() - self._readers += 1 - self._condition.release() - - def release_read(self): - self._condition.acquire() - try: - self._readers -= 1 - if not self._readers: - self._condition.notifyAll() - finally: - self._condition.release() - - def acquire_write(self): - self._condition.acquire() - while self._readers > 0: - self._condition.wait() - - def release_write(self): - self._condition.release() - - @property - def reader_lock(self): - return _ReadLocker(self) - - @property - def writer_lock(self): - return _WriteLocker(self) - diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/schema_meta.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/schema_meta.py deleted file mode 100755 index ec6ce8893e..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/common/schema_meta.py +++ /dev/null @@ -1,7 +0,0 @@ - -FIELD_PRODUCT = '_product' -FIELD_REST_NAMESPACE = '_rest_namespace' -FIELD_REST_PREFIX = '_rest_prefix' -FIELD_PROTOCOL_VERSION = '_protocol_version' -FIELD_VERSION = '_version' -FIELD_ENCRYPTION_FORMATTER = '_encryption_formatter' diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/config.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/config.py deleted file mode 100755 index 27442d0986..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/config.py +++ /dev/null @@ -1,367 +0,0 @@ -"""UCC Config Module -This is for load/save configuration in UCC server or TA. -The load/save action is based on specified schema. -""" - -from __future__ import absolute_import - -import json -import logging -import traceback -import time - -from ..splunktalib.rest import splunkd_request, code_to_msg -from ..splunktalib.common import util as sc_util - -from .common import log as stulog -from .common import UCCException -from urllib import quote - -LOGGING_STOPPED = False - - -def stop_logging(): - """ - Stop Config Logging. This is for not showing REST request error - while splunkd shutting down. - :return: - """ - global LOGGING_STOPPED - LOGGING_STOPPED = True - - -def log(msg, msgx='', level=logging.INFO, need_tb=False): - """ - Logging in UCC Config Module. - :param msg: message content - :param msgx: detail info. - :param level: logging level - :param need_tb: if need logging traceback - :return: - """ - global LOGGING_STOPPED - if LOGGING_STOPPED: - return - - msgx = ' - ' + msgx if msgx else '' - content = 'UCC Config Module: %s%s' % (msg, msgx) - if need_tb: - stack = ''.join(traceback.format_stack()) - content = '%s\r\n%s' % (content, stack) - stulog.logger.log(level, content, exc_info=1) - - -class ConfigException(UCCException): - """Exception for UCC Config Exception - """ - pass - - -class Config(object): - """UCC Config Module - """ - - # Placeholder stands for any field - FIELD_PLACEHOLDER = '*' - - # Head of non-processing endpoint - NON_PROC_ENDPOINT = '#' - - # Some meta fields in UCC Config schema - META_FIELDS = ('_product', '_rest_namespace', '_rest_prefix', - '_protocol_version', '_version', - '_encryption_formatter') - - # Default Values for Meta fields - META_FIELDS_DEFAULT = { - '_encryption_formatter': '', - } - - def __init__(self, splunkd_uri, session_key, schema, - user='nobody', app='-'): - """ - :param splunkd_uri: the root uri of Splunk server, - like https://127.0.0.1:8089 - :param session_key: session key for Splunk server - :param schema: - :param user: owner of the resources requested - :param app: namespace of the resources requested - :return: - """ - self.splunkd_uri = splunkd_uri.strip('/') - self.session_key = session_key - self.user, self.app = user, app - self._parse_schema(schema) - self._check_protocol_version() - - def load(self): - """Load Configurations in UCC according to the schema - It will raise exception if failing to load any endpoint, - because it make no sense with not complete configuration info. - """ - log('"load" method in', level=logging.DEBUG) - - ret = {meta_field: getattr(self, meta_field) - for meta_field in Config.META_FIELDS} - - for ep_id, ep in self._endpoints.iteritems(): - data = {'output_mode': 'json', '--cred--': '1'} - - retries = 4 - waiting_time = [1, 2, 2] - for retry in xrange(retries): - resp, cont = splunkd_request( - splunkd_uri=self.make_uri(ep_id), - session_key=self.session_key, - data=data, - retry=3 - ) - - if resp is None or resp.status != 200: - msg = 'Fail to load endpoint "{ep_id}" - {err}' \ - ''.format(ep_id=ep_id, - err=code_to_msg(resp, cont) - if resp else cont) - log(msg, level=logging.ERROR, need_tb=True) - raise ConfigException(msg) - - try: - ret[ep_id] = self._parse_content(ep_id, cont) - except ConfigException, exc: - log(exc, level=logging.WARNING, need_tb=True) - if retry < retries-1: - time.sleep(waiting_time[retry]) - else: - break - else: - log(exc, level=logging.ERROR, need_tb=True) - raise exc - - log('"load" method out', level=logging.DEBUG) - return ret - - def update_items(self, endpoint_id, item_names, field_names, data, - raise_if_failed=False): - """Update items in specified endpoint with given fields in data - :param endpoint_id: endpoint id in schema, the key name in schema - :param item_names: a list of item name - :param field_names: a list of updated fields - :param data: a dict of content for items, for example: - { - "item_name_1": { - "field_name_1": "value_1", - "field_name_2": "value_2", - }, - "item_name_2": { - "field_name_1": "value_1x", - "field_name_2": "value_2x", - } - } - :raise_if_failed: raise an exception if updating failed. - :return: a list of endpoint ids, which are failed to be updated. - If raise_if_failed is True, it will exist with an exception - on any updating failed. - """ - log('"update_items" method in', - msgx='endpoint_id=%s, item_names=%s, field_names=%s' - % (endpoint_id, item_names, field_names), - level=logging.DEBUG) - - assert endpoint_id in self._endpoints, \ - 'Unexpected endpoint id in given schema - {ep_id}' \ - ''.format(ep_id=endpoint_id) - - item_names_failed = [] - for item_name in item_names: - item_data = data.get(item_name, {}) - item_data = {field_name: self.dump_value(endpoint_id, - item_name, - field_name, - item_data[field_name]) - for field_name in field_names - if field_name in item_data} - if not item_data: - continue - item_uri = self.make_uri(endpoint_id, item_name=item_name) - - resp, cont = splunkd_request(splunkd_uri=item_uri, - session_key=self.session_key, - data=item_data, - method="POST", - retry=3 - ) - if resp is None or resp.status not in (200, 201): - msg = 'Fail to update item "{item}" in endpoint "{ep_id}"' \ - ' - {err}'.format(ep_id=endpoint_id, - item=item_name, - err=code_to_msg(resp, cont) - if resp else cont) - log(msg, level=logging.ERROR) - if raise_if_failed: - raise ConfigException(msg) - item_names_failed.append(item_name) - - log('"update_items" method out', level=logging.DEBUG) - return item_names_failed - - def make_uri(self, endpoint_id, item_name=None): - """Make uri for REST endpoint in TA according to given schema - :param endpoint_id: endpoint id in schema - :param item_name: item name for given endpoint. None for listing all - :return: - """ - endpoint = self._endpoints[endpoint_id]['endpoint'] - ep_full = endpoint[1:].strip('/') \ - if endpoint.startswith(Config.NON_PROC_ENDPOINT) else \ - '{admin_match}/{protocol_version}/{endpoint}' \ - ''.format(admin_match=self._rest_namespace, - protocol_version=self._protocol_version, - endpoint=(self._rest_prefix + - self._endpoints[endpoint_id]['endpoint'])) - ep_uri = None if endpoint_id not in self._endpoints else \ - '{splunkd_uri}/servicesNS/{user}/{app}/{endpoint_full}' \ - ''.format(splunkd_uri=self.splunkd_uri, - user=self.user, - app=self.app, - endpoint_full=ep_full - ) - - url = ep_uri if item_name is None else "{ep_uri}/{item_name}"\ - .format(ep_uri=ep_uri, item_name=quote(item_name)) - if item_name is None: - url += '?count=-1' - log('"make_uri" method', msgx='url=%s' % url, - level=logging.DEBUG) - return url - - def _parse_content(self, endpoint_id, content): - """Parse content returned from REST - :param content: a JSON string returned from REST. - """ - try: - content = json.loads(content)['entry'] - ret = {ent['name']: ent['content'] for ent in content} - except Exception as exc: - msg = 'Fail to parse content from endpoint_id=%s' \ - ' - %s' % (endpoint_id, exc) - log(msg, level=logging.ERROR, need_tb=True) - raise ConfigException(msg) - - ret = {name: {key: self.load_value(endpoint_id, name, key, val) - for key, val in ent.iteritems() - if not key.startswith('eai:')} - for name, ent in ret.iteritems()} - return ret - - def _parse_schema(self, ucc_config_schema): - try: - ucc_config_schema = json.loads(ucc_config_schema) - except ValueError: - msg = 'Invalid JSON content of schema' - log(msg, level=logging.ERROR, need_tb=True) - raise ConfigException(msg) - except Exception as exc: - log(exc, level=logging.ERROR, need_tb=True) - raise ConfigException(exc) - - ucc_config_schema.update({key: val for key, val in - Config.META_FIELDS_DEFAULT.iteritems() - if key not in ucc_config_schema}) - for field in Config.META_FIELDS: - assert field in ucc_config_schema and \ - isinstance(ucc_config_schema[field], basestring), \ - 'Missing or invalid field "%s" in given schema' % field - setattr(self, field, ucc_config_schema[field]) - - self._endpoints = {} - for key, val in ucc_config_schema.iteritems(): - if key.startswith('_'): - continue - - assert isinstance(val, dict), \ - 'The schema of endpoint "%s" should be dict' % key - assert 'endpoint' in val, \ - 'The endpoint "%s" has no endpoint entry' % key - - self._endpoints[key] = val - - def _check_protocol_version(self): - """ - Check if the protocol version in given schema is supported. - :return: - """ - if not self._protocol_version: - return - if not self._protocol_version.startswith('1.'): - raise ConfigException('Unsupported protocol version "%s" ' - 'in given schema' % self._protocol_version) - - def load_value(self, endpoint_id, item_name, fname, fval): - field_type = self._get_field_type(endpoint_id, item_name, fname) - if field_type == '': - return fval - - try: - field_type = field_type.lower() - if field_type == 'bool': - return True if sc_util.is_true(fval) else False - elif field_type == 'int': - return int(fval) - elif field_type == 'json': - return json.loads(fval) - except Exception as exc: - msg = 'Fail to load value of "{type_name}" - ' \ - 'endpoint={endpoint}, item={item}, field={field}' \ - ''.format(type_name=field_type, - endpoint=endpoint_id, - item=item_name, - field=fname) - log(msg, msgx=str(exc), level=logging.WARNING, need_tb=True) - raise ConfigException(msg) - - def dump_value(self, endpoint_id, item_name, fname, fval): - field_type = self._get_field_type(endpoint_id, item_name, fname) - if field_type == '': - return fval - - try: - field_type = field_type.lower() - if field_type == 'bool': - return str(fval).lower() - elif field_type == 'json': - return json.dumps(fval) - else: - return fval - except Exception, exc: - msg = 'Fail to dump value of "{type_name}" - ' \ - 'endpoint={endpoint}, item={item}, field={field}' \ - ''.format(type_name=field_type, - endpoint=endpoint_id, - item=item_name, - field=fname) - log(msg, msgx=str(exc), level=logging.ERROR, need_tb=True) - raise ConfigException(msg) - - def _get_field_type(self, endpoint_id, item_name, fname): - field_types = self._endpoints[endpoint_id].get('field_types', {}) - if item_name in field_types: - fields = field_types[item_name] - elif Config.FIELD_PLACEHOLDER in field_types: - fields = field_types[Config.FIELD_PLACEHOLDER] - else: - fields = {} - - field_type = fields.get(fname, '') - if field_type not in ('', 'bool', 'int', 'json'): - msg = 'Unsupported type "{type_name}" for value in schema - ' \ - 'endpoint={endpoint}, item={item}, field={field}' \ - ''.format(type_name=field_type, - endpoint=endpoint_id, - item=item_name, - field=fname) - log(msg, level=logging.ERROR, need_tb=True) - raise ConfigException(msg) - return field_type - - def get_endpoints(self): - return self._endpoints diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/__init__.py deleted file mode 100755 index bb35ee1578..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "1.0.2" \ No newline at end of file diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_checkpoint_manager.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_checkpoint_manager.py deleted file mode 100755 index 9676f500a2..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_checkpoint_manager.py +++ /dev/null @@ -1,147 +0,0 @@ -import json -import re - -from . import ta_consts as c -from . import ta_helper as th -from ..common import log as stulog -from ...splunktalib import state_store as ss -from ...splunktalib.common.util import is_true - - -class TACheckPointMgr(object): - SEPARATOR = "_" * 3 - - # FIXME We'd better move all default values together - _DEFAULT_MAX_CACHE_SECONDS = 5 - _MAXIMUM_MAX_CACHE_SECONDS = 3600 - - def __init__(self, meta_config, task_config): - self._task_config = task_config - self._store = self._create_state_store( - meta_config, - task_config.get(c.checkpoint_storage_type), - task_config[c.appname] - ) - - def _create_state_store(self, meta_config, storage_type, app_name): - stulog.logger.debug('Got checkpoint storage type=%s', storage_type) - - if storage_type == c.checkpoint_kv_storage: - collection_name = self._get_collection_name() - stulog.logger.debug( - 'Creating KV state store, collection name=%s', collection_name - ) - return ss.get_state_store( - meta_config, - appname=app_name, - collection_name=collection_name, - use_kv_store=True - ) - - use_cache_file = self._use_cache_file() - max_cache_seconds = \ - self._get_max_cache_seconds() if use_cache_file else None - - stulog.logger.debug( - 'Creating file state store, use_cache_file=%s, max_cache_seconds=%s', - use_cache_file, max_cache_seconds - ) - - return ss.get_state_store( - meta_config, - app_name, - use_cache_file=use_cache_file, - max_cache_seconds=max_cache_seconds - ) - - def _get_collection_name(self): - collection = self._task_config.get(c.collection_name) - collection = collection.strip() if collection else '' - - if not collection: - input_name = self._task_config[c.mod_input_name] - stulog.logger.info( - 'Collection name="%s" is empty, set it to "%s"', - collection, input_name - ) - collection = input_name - return re.sub(r'[^\w]+', '_', collection) - - def _use_cache_file(self): - # TODO Move the default value outside code - use_cache_file = is_true(self._task_config.get(c.use_cache_file, True)) - if use_cache_file: - stulog.logger.info( - "Stanza=%s using cached file store to create checkpoint", - self._task_config[c.stanza_name] - ) - return use_cache_file - - def _get_max_cache_seconds(self): - default = self._DEFAULT_MAX_CACHE_SECONDS - seconds = self._task_config.get( - c.max_cache_seconds, default - ) - try: - seconds = int(seconds) - except ValueError: - stulog.logger.warning( - "The max_cache_seconds '%s' is not a valid integer," - " so set this variable to default value %s", - seconds, default - ) - seconds = default - else: - maximum = self._MAXIMUM_MAX_CACHE_SECONDS - if not (1 <= seconds <= maximum): - # for seconds>3600 set it to 3600. for seconds <=0 set it to default. - adjusted = max(min(seconds, maximum), default) - stulog.logger.warning( - "The max_cache_seconds (%s) is expected in range[1,%s]," - " set it to %s", - seconds, maximum, adjusted - ) - seconds = adjusted - return seconds - - def get_ckpt_key(self, namespaces=None): - return self._key_formatter(namespaces) - - def get_ckpt(self, namespaces=None, show_namespaces=False): - key, namespaces = self.get_ckpt_key(namespaces) - raw_checkpoint = self._store.get_state(key) - stulog.logger.info("Get checkpoint key='%s' value='%s'", - key, json.dumps(raw_checkpoint)) - if not show_namespaces and raw_checkpoint: - return raw_checkpoint.get("data") - return raw_checkpoint - - def update_ckpt(self, ckpt, namespaces=None): - if not ckpt: - stulog.logger.warning("Checkpoint expect to be not empty.") - return - key, namespaces = self.get_ckpt_key(namespaces) - value = {"namespaces": namespaces, "data": ckpt} - stulog.logger.info("Update checkpoint key='%s' value='%s'", - key, json.dumps(value)) - self._store.update_state(key, value) - - def remove_ckpt(self, namespaces=None): - key, namespaces = self.get_ckpt_key(namespaces) - self._store.delete_state(key) - - def _key_formatter(self, namespaces=None): - if not namespaces: - stulog.logger.info('Namespaces is empty, using stanza name instead.') - namespaces = [self._task_config[c.stanza_name]] - key_str = TACheckPointMgr.SEPARATOR.join(namespaces) - hashed_file = th.format_name_for_file(key_str) - stulog.logger.info("raw_file='%s' hashed_file='%s'", key_str, hashed_file) - return hashed_file, namespaces - - def close(self, key=None): - try: - self._store.close(key) - stulog.logger.info('Closed state store successfully. key=%s', key) - except Exception: - stulog.logger.exception('Error closing state store. key=%s', key) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_config.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_config.py deleted file mode 100755 index 68664b8c4c..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_config.py +++ /dev/null @@ -1,155 +0,0 @@ -import os.path as op -import socket - -import ta_consts as c -import ta_helper as th -from ..common import log as stulog -from ...splunktalib import modinput as modinput -from ...splunktalib import splunk_cluster as sc -from ...splunktalib.common import util - - -# methods can be overrided by subclass : process_task_configs -class TaConfig(object): - _current_hostname = socket.gethostname() - _appname = util.get_appname_from_path(op.abspath(__file__)) - - def __init__(self, meta_config, client_schema, log_suffix=None, - stanza_name=None, input_type=None, - single_instance=True): - self._meta_config = meta_config - self._stanza_name = stanza_name - self._input_type = input_type - self._log_suffix = log_suffix - self._single_instance = single_instance - self._task_configs = [] - self._client_schema = client_schema - self._server_info = sc.ServerInfo(meta_config[c.server_uri], - meta_config[c.session_key]) - self._all_conf_contents = {} - self._get_division_settings = {} - self.set_logging() - self._load_task_configs() - - def is_shc_member(self): - return self._server_info.is_shc_member() - - def is_search_head(self): - return self._server_info.is_search_head() - - def is_single_instance(self): - return self._single_instance - - def get_meta_config(self): - return self._meta_config - - def get_task_configs(self): - return self._task_configs - - def get_all_conf_contents(self): - if self._all_conf_contents: - return self._all_conf_contents.get(c.inputs), \ - self._all_conf_contents.get(c.all_configs), \ - self._all_conf_contents.get(c.global_settings) - - inputs, configs, global_settings = th.get_all_conf_contents( - self._meta_config[c.server_uri], - self._meta_config[c.session_key], - self._client_schema, self._input_type) - self._all_conf_contents[c.inputs] = inputs - self._all_conf_contents[c.all_configs] = configs - self._all_conf_contents[c.global_settings] = global_settings - return inputs, configs, global_settings - - def set_logging(self): - # The default logger name is "cloud_connect_engine" - if self._stanza_name and self._log_suffix: - logger_name = self._log_suffix + "_" + th.format_name_for_file( - self._stanza_name) - stulog.reset_logger(logger_name) - inputs, configs, global_settings = self.get_all_conf_contents() - log_level = "INFO" - for item in global_settings.get("settings"): - if item.get(c.name) == "logging" and item.get("loglevel"): - log_level = item["loglevel"] - break - stulog.set_log_level(log_level) - stulog.logger.info("Set log_level={}".format(log_level)) - stulog.logger.info("Start {} task".format(self._stanza_name)) - - def get_input_type(self): - return self._input_type - - def _get_checkpoint_storage_type(self, config): - cs_type = config.get(c.checkpoint_storage_type) - stulog.logger.debug("Checkpoint storage type=%s", cs_type) - - cs_type = cs_type.strip() if cs_type else c.checkpoint_auto - - # Allow user configure 'auto' and 'file' only. - if cs_type not in (c.checkpoint_auto, c.checkpoint_file): - stulog.logger.warning( - "Checkpoint storage type='%s' is invalid, change it to '%s'", - cs_type, c.checkpoint_auto - ) - cs_type = c.checkpoint_auto - - if cs_type == c.checkpoint_auto and self.is_search_head(): - stulog.logger.info( - "Checkpoint storage type is '%s' and instance is " - "search head, set checkpoint storage type to '%s'.", - c.checkpoint_auto, - c.checkpoint_kv_storage - ) - cs_type = c.checkpoint_kv_storage - return cs_type - - def _load_task_configs(self): - inputs, configs, global_settings = self.get_all_conf_contents() - if self._input_type: - inputs = inputs.get(self._input_type) - if not self._single_instance: - inputs = [input for input in inputs if - input[c.name] == self._stanza_name] - all_task_configs = [] - for input in inputs: - task_config = {} - task_config.update(input) - task_config[c.configs] = configs - task_config[c.settings] = \ - {item[c.name]: item for item in global_settings["settings"]} - if self.is_single_instance(): - collection_interval = "collection_interval" - task_config[c.interval] = task_config.get(collection_interval) - task_config[c.interval] = int(task_config[c.interval]) - if task_config[c.interval] <= 0: - raise ValueError( - "The interval value {} is invalid." - " It should be a positive integer".format( - task_config[c.interval])) - - task_config[c.checkpoint_storage_type] = \ - self._get_checkpoint_storage_type(task_config) - - task_config[c.appname] = TaConfig._appname - task_config[c.mod_input_name] = self._input_type - task_config[c.stanza_name] = task_config[c.name] - - all_task_configs.append(task_config) - self._task_configs = all_task_configs - - # Override this method if some transforms or validations needs to be done - # before task_configs is exposed - def process_task_configs(self, task_configs): - pass - - -def create_ta_config(settings, config_cls=TaConfig, log_suffix=None, - single_instance=True): - meta_config, configs = modinput.get_modinput_configs_from_stdin() - stanza_name = None - input_type = None - if configs and "://" in configs[0].get("name", ""): - input_type, stanza_name = configs[0].get("name").split("://", 1) - return config_cls(meta_config, settings, log_suffix, stanza_name, - input_type, single_instance=single_instance) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_consts.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_consts.py deleted file mode 100755 index 187ce0f749..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_consts.py +++ /dev/null @@ -1,54 +0,0 @@ -server_uri = "server_uri" -session_key = "session_key" -version = "version" -appname = "appname" -event_writer = "event_writer" -index = "index" -default_index = "default" -source = "source" -sourcetype = "sourcetype" -data_loader = "data_loader" - -meta_configs = "meta_configs" -disabled = "disabled" -resource = "resource" -events = "events" -scope = "scope" -checkpoint_dir = "checkpoint_dir" - -ckpt_dict = "ckpt_dict" -inputs = "inputs" -input_name = "input_name" -input_data = "input_data" -interval = "interval" -data = "data" -batch_size = 'batch_size' -time_fmt = "%Y-%m-%dT%H:%M:%S" -utc_time_fmt = "%Y-%m-%dT%H:%M:%S.%fZ" - -# system setting keys -checkpoint_storage_type = "builtin_system_checkpoint_storage_type" - -# Possible values for checkpoint storage type -checkpoint_auto = 'auto' -checkpoint_kv_storage = 'kv_store' -checkpoint_file = 'file' - -# For cache file -use_cache_file = "builtin_system_use_cache_file" -max_cache_seconds = "builtin_system_max_cache_seconds" -# For kv store -collection_name = "builtin_system_kvstore_collection_name" - -settings = "__settings__" -configs = "__configs__" - -name = "name" -config = "config" -division = "division" -stanza_name = "stanza_name" -divide_key = "_divide_key" -divide_endpoint = "_divide_endpoint" -mod_input_name = "mod_input_name" -global_settings = "global_settings" -all_configs = "all_configs" diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_client.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_client.py deleted file mode 100755 index cf2cb9cdef..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_client.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/python -from . import ta_checkpoint_manager as cp -from . import ta_data_collector as tdc - - -def build_event(host=None, - source=None, - sourcetype=None, - time=None, - index=None, - raw_data="", - is_unbroken=False, - is_done=False): - if is_unbroken is False and is_done is True: - raise Exception('is_unbroken=False is_done=True is invalid') - return tdc.event_tuple._make([host, source, sourcetype, time, index, - raw_data, is_unbroken, is_done]) - - -class TaDataClient(object): - def __init__(self, - meta_config, - task_config, - checkpoint_mgr=None, - event_writer=None): - self._meta_config = meta_config - self._task_config = task_config - self._checkpoint_mgr = checkpoint_mgr - self._event_writer = event_writer - self._stop = False - - def is_stopped(self): - return self._stop - - def stop(self): - self._stop = True - - def get(self): - raise StopIteration - - -def create_data_collector(dataloader, - tconfig, - meta_configs, - task_config, - data_client_cls, - checkpoint_cls=None): - checkpoint_manager_cls = checkpoint_cls or cp.TACheckPointMgr - return tdc.TADataCollector(tconfig, meta_configs, task_config, - checkpoint_manager_cls, data_client_cls, - dataloader) - - -def client_adatper(job_func): - class TaDataClientAdapter(TaDataClient): - def __init__(self, all_conf_contents, meta_config, task_config, - chp_mgr): - super(TaDataClientAdapter, self).__init__(meta_config, task_config, - chp_mgr) - self._execute_times = 0 - self._gen = job_func(self._task_config, chp_mgr) - - def stop(self): - """ - overwrite to handle stop control command - """ - - # normaly base class just set self._stop as True - super(TaDataClientAdapter, self).stop() - - def get(self): - """ - overwrite to get events - """ - self._execute_times += 1 - if self.is_stopped(): - # send stop signal - self._gen.send(self.is_stopped()) - raise StopIteration - if self._execute_times == 1: - return self._gen.next() - return self._gen.send(self.is_stopped()) - - return TaDataClientAdapter diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_collector.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_collector.py deleted file mode 100755 index 3069cd50e3..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_collector.py +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/python -import threading -import time -from collections import namedtuple - -import ta_consts as c -from ..common import log as stulog -from ...splunktalib.common import util as scu - -evt_fmt = ("{0}" - "" - "" - "" - "{4}" - "") - -unbroken_evt_fmt = ("" - "" - "{0}" - "" - "" - "" - "{4}" - "" - "{6}" - "" - "") - -event_tuple = namedtuple('Event', - ['host', 'source', 'sourcetype', 'time', 'index', - 'raw_data', 'is_unbroken', 'is_done']) - - -class TADataCollector(object): - def __init__(self, tconfig, meta_config, task_config, - checkpoint_manager_cls, data_client_cls, data_loader): - self._lock = threading.Lock() - self._ta_config = tconfig - self._meta_config = meta_config - self._task_config = task_config - self._stopped = False - self._p = self._get_logger_prefix() - self._checkpoint_manager = checkpoint_manager_cls(meta_config, - task_config) - self.data_client_cls = data_client_cls - self._data_loader = data_loader - self._client = None - - def get_meta_configs(self): - return self._meta_config - - def get_task_config(self): - return self._task_config - - def get_interval(self): - return self._task_config[c.interval] - - def _get_logger_prefix(self): - pairs = ['{}="{}"'.format(c.stanza_name, self._task_config[ - c.stanza_name])] - return "[{}]".format(" ".join(pairs)) - - def stop(self): - self._stopped = True - if self._client: - self._client.stop() - - def __call__(self): - self.index_data() - - def _build_event(self, events): - if not events: - return None - if not isinstance(events, list): - events = [events] - evts = [] - for event in events: - assert event.raw_data, "the raw data of events is empty" - if event.is_unbroken: - evt = unbroken_evt_fmt.format( - event.host or "", event.source or "", event.sourcetype or - "", event.time or "", event.index or "", - scu.escape_cdata(event.raw_data), "" if - event.is_done else "") - else: - evt = evt_fmt.format(event.host or "", event.source or "", - event.sourcetype or "", event.time or "", - event.index or "", - scu.escape_cdata(event.raw_data)) - evts.append(evt) - return evts - - def _create_data_client(self): - return self.data_client_cls(self._meta_config, - self._task_config, - self._checkpoint_manager, - self._data_loader.get_event_writer()) - - def index_data(self): - if self._lock.locked(): - stulog.logger.debug( - "Last round of stanza={} is not done yet".format( - self._task_config[c.stanza_name])) - return - with self._lock: - try: - self._do_safe_index() - self._checkpoint_manager.close() - except Exception: - stulog.logger.exception("{} Failed to index data" - .format(self._p)) - stulog.logger.info("{} End of indexing data".format(self._p)) - if not self._ta_config.is_single_instance(): - self._data_loader.tear_down() - - def _write_events(self, events): - evts = self._build_event(events) - if evts: - if not self._data_loader.write_events(evts): - stulog.logger.info("{} the event queue is closed and the " - "received data will be discarded".format( - self._p)) - return False - return True - - def _do_safe_index(self): - self._client = self._create_data_client() - while not self._stopped: - try: - events = self._client.get() - if not events: - continue - else: - if not self._write_events(events): - break - except StopIteration: - stulog.logger.info("{} Finished this round".format(self._p)) - return - except Exception: - stulog.logger.exception("{} Failed to get msg".format(self._p)) - break - # in case encounter exception or fail to write events - if not self._stopped: - self.stop() diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_loader.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_loader.py deleted file mode 100755 index 181c7a618f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_data_loader.py +++ /dev/null @@ -1,168 +0,0 @@ -""" -Data Loader main entry point -""" - - -import Queue -import os.path as op -import ConfigParser - -from ...splunktalib.concurrent import concurrent_executor as ce -from ...splunktalib import timer_queue as tq -from ...splunktalib.schedule import job as sjob -from ...splunktalib.common import log - - -class TADataLoader(object): - """ - Data Loader boots all underlying facilities to handle data collection - """ - - def __init__(self, job_scheduler, event_writer): - """ - @configs: a list like object containing a list of dict - like object. Each element shall implement dict.get/[] like interfaces - to get the value for a key. - @job_scheduler: schedulering the jobs. shall implement get_ready_jobs - @event_writer: write_events - """ - - self._settings = self._read_default_settings() - self._settings["daemonize_thread"] = False - self._event_writer = event_writer - self._wakeup_queue = Queue.Queue() - self._scheduler = job_scheduler - self._timer_queue = tq.TimerQueue() - self._executor = ce.ConcurrentExecutor(self._settings) - self._started = False - - def run(self, jobs): - if self._started: - return - self._started = True - - self._event_writer.start() - self._executor.start() - self._timer_queue.start() - self._scheduler.start() - log.logger.info("TADataLoader started.") - - def _enqueue_io_job(job): - job_props = job.get_props() - real_job = job_props["real_job"] - self.run_io_jobs((real_job,)) - - for job in jobs: - j = sjob.Job(_enqueue_io_job, {"real_job": job}, - job.get_interval()) - self._scheduler.add_jobs((j,)) - - self._wait_for_tear_down() - - for job in jobs: - job.stop() - - self._scheduler.tear_down() - self._timer_queue.tear_down() - self._executor.tear_down() - self._event_writer.tear_down() - log.logger.info("DataLoader stopped.") - - def _wait_for_tear_down(self): - wakeup_q = self._wakeup_queue - while 1: - try: - go_exit = wakeup_q.get(timeout=1) - except Queue.Empty: - pass - else: - if go_exit: - log.logger.info("DataLoader got stop signal") - self._stopped = True - break - - def tear_down(self): - self._wakeup_queue.put(True) - log.logger.info("DataLoader is going to stop.") - - def stopped(self): - return self._stopped - - def run_io_jobs(self, jobs, block=True): - self._executor.enqueue_io_funcs(jobs, block) - - def run_compute_job(self, func, args=(), kwargs={}): - self._executor.run_compute_func_sync(func, args, kwargs) - - def run_compute_job_async(self, func, args=(), kwargs={}, callback=None): - """ - @return: AsyncResult - """ - - return self._executor.run_compute_func_async(func, args, - kwargs, callback) - - def add_timer(self, callback, when, interval): - return self._timer_queue.add_timer(callback, when, interval) - - def remove_timer(self, timer): - self._timer_queue.remove_timer(timer) - - def write_events(self, events): - return self._event_writer.write_events(events) - - def get_event_writer(self): - return self._event_writer - - @staticmethod - def _read_default_settings(): - cur_dir = op.dirname(op.abspath(__file__)) - setting_file = op.join(cur_dir,"../../","splunktalib", "setting.conf") - parser = ConfigParser.ConfigParser() - parser.read(setting_file) - settings = {} - keys = ("process_size", "thread_min_size", "thread_max_size", - "task_queue_size") - for option in keys: - try: - settings[option] = parser.get("global", option) - except ConfigParser.NoOptionError: - settings[option] = -1 - - try: - settings[option] = int(settings[option]) - except ValueError: - settings[option] = -1 - log.logger.debug("settings: %s", settings) - return settings - - -class GlobalDataLoader(object): - """ Singleton, inited when started""" - - __instance = None - - @staticmethod - def get_data_loader(scheduler, writer): - if GlobalDataLoader.__instance is None: - GlobalDataLoader.__instance = TADataLoader( - scheduler, writer) - return GlobalDataLoader.__instance - - @staticmethod - def reset(): - GlobalDataLoader.__instance = None - - -def create_data_loader(): - """ - create a data loader with default event_writer, job_scheudler - """ - - from ...splunktalib import event_writer as ew - from ...splunktalib.schedule import scheduler as sched - - writer = ew.EventWriter() - scheduler = sched.Scheduler() - loader = GlobalDataLoader.get_data_loader(scheduler, writer) - return loader diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_helper.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_helper.py deleted file mode 100755 index 345194cb17..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_helper.py +++ /dev/null @@ -1,154 +0,0 @@ -import hashlib -import json -import os.path as op -import re -from calendar import timegm -from datetime import datetime - -import functools32 -from splunktaucclib.global_config import GlobalConfig, GlobalConfigSchema -from . import ta_consts as c -from ...splunktacollectorlib import config as sc -from ...splunktalib.common import util - - -def utc2timestamp(human_time): - regex1 = ur"\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}" - match = re.search(regex1, human_time) - if match: - formated = match.group() - else: - return None - - strped_time = datetime.strptime(formated, c.time_fmt) - timestamp = timegm(strped_time.utctimetuple()) - - regex2 = "\d{4}-\d{2}-\d{2}.\d{2}:\d{2}:\d{2}(\.\d+)" - match = re.search(regex2, human_time) - if match: - timestamp += float(match.group(1)) - else: - timestamp += float("0.000000") - return timestamp - - -def get_md5(data): - """ - function name is not change, actually use sha1 instead - :param data: - :return: - """ - assert data is not None, "The input cannot be None" - if isinstance(data, (unicode, str)): - return hashlib.sha256(data.encode('utf-8')).hexdigest() - elif isinstance(data, (list, tuple, dict)): - return hashlib.sha256(json.dumps(data).encode('utf-8')).hexdigest() - - -def get_all_conf_contents(server_uri, sessionkey, settings, input_type=None): - schema = GlobalConfigSchema(settings) - global_config = GlobalConfig( - server_uri, sessionkey, schema - ) - inputs = global_config.inputs.load(input_type=input_type) - configs = global_config.configs.load() - settings = global_config.settings.load() - return inputs, configs, settings - - -@functools32.lru_cache(maxsize=64) -def format_name_for_file(name): - return hashlib.sha256(name).hexdigest() - - -class ConfigSchemaHandler(object): - _app_name = util.get_appname_from_path(op.abspath(__file__)) - # Division schema keys. - TYPE = "type" - - TYPE_SINGLE = "single" - TYPE_MULTI = "multi" - REFER = "refer" - SEPARATOR = "separator" - - def __init__(self, meta_configs, client_schema): - self._config = sc.Config(splunkd_uri=meta_configs[c.server_uri], - session_key=meta_configs[c.session_key], - schema=json.dumps(client_schema[ - c.config]), - user="nobody", - app=ConfigSchemaHandler._app_name) - self._client_schema = client_schema - self._all_conf_contents = {} - self._load_conf_contents() - self._division_settings = self._divide_settings() - - def get_endpoints(self): - return self._config.get_endpoints() - - def get_all_conf_contents(self): - return self._all_conf_contents - - def get_single_conf_contents(self, endpoint): - return self._all_conf_contents.get(endpoint) - - def get_division_settings(self): - return self._division_settings - - def _divide_settings(self): - division_schema = self._client_schema[c.division] - division_settings = dict() - for division_endpoint, division_contents in division_schema.iteritems(): - division_settings[division_endpoint] = self._process_division( - division_endpoint, division_contents) - return division_settings - - def _load_conf_contents(self): - self._all_conf_contents = self._config.load() - - def _process_division(self, division_endpoint, division_contents): - division_metrics = [] - assert isinstance(division_contents, dict) - for division_key, division_value in division_contents.iteritems(): - try: - assert self.TYPE in division_value and \ - division_value[self.TYPE] in \ - [self.TYPE_SINGLE, self.TYPE_MULTI] and \ - self.SEPARATOR in division_value if \ - division_value[self.TYPE] == self.TYPE_MULTI else True - except Exception: - raise Exception("Invalid division schema") - division_metrics.append(DivisionRule(division_endpoint, - division_key, - division_value[self.TYPE], - division_value.get( - self.SEPARATOR, - ), - division_value.get( - self.REFER, - ))) - return division_metrics - - -class DivisionRule(object): - def __init__(self, endpoint, metric, type, separator, refer): - self._endpoint = endpoint - self._metric = metric - self._type = type - self._separator = separator - self._refer = refer - - def endpoint(self): - return self._endpoint - - def metric(self): - return self._metric - - def type(self): - return self._type - - def separator(self): - return self._separator - - def refer(self): - return self._refer diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_mod_input.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_mod_input.py deleted file mode 100755 index 282cb3163f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/data_collection/ta_mod_input.py +++ /dev/null @@ -1,272 +0,0 @@ -#!/usr/bin/python - -""" -This is the main entry point for My TA -""" - -import os.path as op -import platform -import sys -import time - -from . import ta_checkpoint_manager as cpmgr -from . import ta_config as tc -from . import ta_data_client as tdc -from . import ta_data_loader as dl -from ..common import load_schema_file as ld -from ..common import log as stulog -from ...common.lib_util import get_app_root_dir, get_mod_input_script_name -from ...splunktalib import file_monitor as fm -from ...splunktalib import modinput -from ...splunktalib import orphan_process_monitor as opm -from ...splunktalib.common import util as utils - -utils.remove_http_proxy_env_vars() - -__CHECKPOINT_DIR_MAX_LEN__ = 180 - - -def do_scheme( - mod_input_name, - schema_para_list=None, - single_instance=True, -): - """ - Feed splunkd the TA's scheme - - """ - builtin_names = { - "name", "index", "sourcetype", "host", "source", - "disabled", "interval" - } - - param_string_list = [] - if schema_para_list is None: - schema_para_list = () - - for param in schema_para_list: - if param in builtin_names: - continue - - param_string_list.append( - """ - - {param} - 0 - 0 - - """.format(param=param) - ) - - description = ("Go to the add-on's configuration UI and configure" - " modular inputs under the Inputs menu.") - - print """ - - {data_input_title} - {description} - true - xml - {single_instance} - - - - {data_input_title} Data Input Name - - {param_str} - - - - """.format( - single_instance=(str(single_instance)).lower(), - data_input_title=mod_input_name, - param_str=''.join(param_string_list), - description=description, - ) - - -def _setup_signal_handler(data_loader, ta_short_name): - """ - Setup signal handlers - :data_loader: data_loader.DataLoader instance - """ - - def _handle_exit(signum, frame): - stulog.logger.info("{} receives exit signal".format(ta_short_name)) - if data_loader is not None: - data_loader.tear_down() - - utils.handle_tear_down_signals(_handle_exit) - - -def _handle_file_changes(data_loader): - """ - :reload conf files and exit - """ - - def _handle_refresh(changed_files): - stulog.logger.info("Detect {} changed, reboot itself".format( - changed_files)) - data_loader.tear_down() - - return _handle_refresh - - -def _get_conf_files(settings): - rest_root = settings.get("meta").get("restRoot") - file_list = [rest_root + "_settings.conf"] - if settings.get("pages") and settings.get("pages").get("configuration"): - configs = settings.get("pages").get("configuration") - tabs = configs.get("tabs") if configs.get("tabs") else [] - for tab in tabs: - if tab.get("table"): - file_list.append(rest_root + "_" + tab.get("name") + ".conf") - ta_dir = get_app_root_dir() - return [op.join(ta_dir, "local", f) for f in file_list] - - -def run(collector_cls, settings, checkpoint_cls=None, config_cls=None, - log_suffix=None, single_instance=True, cc_json_file=None): - """ - Main loop. Run this TA forever - """ - ta_short_name = settings["meta"]["name"].lower() - - # This is for stdout flush - utils.disable_stdout_buffer() - - # http://bugs.python.org/issue7980 - time.strptime('2016-01-01', '%Y-%m-%d') - - loader = dl.create_data_loader() - - # handle signal - _setup_signal_handler(loader, ta_short_name) - - # monitor files to reboot - try: - monitor = fm.FileMonitor(_handle_file_changes(loader), - _get_conf_files(settings)) - loader.add_timer(monitor.check_changes, time.time(), 10) - except Exception: - stulog.logger.exception("Fail to add files for monitoring") - - # add orphan process handling, which will check each 1 second - orphan_checker = opm.OrphanProcessChecker(loader.tear_down) - loader.add_timer(orphan_checker.check_orphan, time.time(), 1) - - tconfig = tc.create_ta_config(settings, config_cls or tc.TaConfig, - log_suffix, single_instance=single_instance) - task_configs = tconfig.get_task_configs() - - if not task_configs: - stulog.logger.debug("No task and exiting...") - return - meta_config = tconfig.get_meta_config() - meta_config["cc_json_file"] = cc_json_file - - if tconfig.is_shc_member(): - # Don't support SHC env - stulog.logger.error("This host is in search head cluster environment , " - "will exit.") - return - - # In this case, use file for checkpoint - if _is_checkpoint_dir_length_exceed_limit(tconfig, - meta_config["checkpoint_dir"]): - stulog.logger.error("The length of the checkpoint directory path: '{}' " - "is too long. The max length we support is {}", - meta_config["checkpoint_dir"], - __CHECKPOINT_DIR_MAX_LEN__) - return - - jobs = [ - tdc.create_data_collector( - loader, - tconfig, - meta_config, - task_config, - collector_cls, - checkpoint_cls=checkpoint_cls or cpmgr.TACheckPointMgr - ) - for task_config in task_configs - ] - - loader.run(jobs) - - -def _is_checkpoint_dir_length_exceed_limit(config, checkpoint_dir): - return platform.system() == 'Windows' \ - and not config.is_search_head() \ - and len(checkpoint_dir) >= __CHECKPOINT_DIR_MAX_LEN__ - - -def validate_config(): - """ - Validate inputs.conf - """ - - _, configs = modinput.get_modinput_configs_from_stdin() - return 0 - - -def usage(): - """ - Print usage of this binary - """ - - hlp = "%s --scheme|--validate-arguments|-h" - print >> sys.stderr, hlp % sys.argv[0] - sys.exit(1) - - -def main( - collector_cls, - schema_file_path, - log_suffix="modinput", - checkpoint_cls=None, - config_cls=None, - cc_json_file=None, - schema_para_list=None, - single_instance=True -): - """ - Main entry point - """ - assert collector_cls, "ucc modinput collector is None." - assert schema_file_path, "ucc modinput schema file is None" - - settings = ld(schema_file_path) - - mod_input_name = get_mod_input_script_name() - - args = sys.argv - if len(args) > 1: - if args[1] == "--scheme": - do_scheme( - mod_input_name=mod_input_name, - schema_para_list=schema_para_list, - single_instance=single_instance - ) - elif args[1] == "--validate-arguments": - sys.exit(validate_config()) - elif args[1] in ("-h", "--h", "--help"): - usage() - else: - usage() - else: - try: - run( - collector_cls, - settings, - checkpoint_cls=checkpoint_cls, - config_cls=config_cls, - log_suffix=log_suffix, - single_instance=single_instance, - cc_json_file=cc_json_file - ) - except Exception: - stulog.logger.exception( - "{} task encounter exception".format(mod_input_name)) - stulog.logger.info("End {} task".format(mod_input_name)) - sys.exit(0) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/splunk_ta_import_declare.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/splunk_ta_import_declare.py deleted file mode 100755 index 7290cfd88b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/splunk_ta_import_declare.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -This module is used to filter and reload PATH. -""" - -import os -import sys -import re - -ta_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -ta_lib_name = re.sub("[^\w]+", "_", ta_name.lower()) -assert ta_name or ta_name == "package", "TA name is None or package" -pattern = re.compile(r"[\\/]etc[\\/]apps[\\/][^\\/]+[\\/]bin[\\/]?$") -new_paths = [path for path in sys.path if not pattern.search(path) or ta_name in path] -new_paths.insert(0, os.path.sep.join([os.path.dirname(__file__), ta_lib_name])) -sys.path = new_paths - - diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/ta_cloud_connect_client.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/ta_cloud_connect_client.py deleted file mode 100755 index 4e5df1ca1b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktacollectorlib/ta_cloud_connect_client.py +++ /dev/null @@ -1,41 +0,0 @@ -from .data_collection.ta_data_client import TaDataClient -from ..splunktacollectorlib.common import log as stulog -from ..splunktacollectorlib.data_collection import ta_consts as c -from ..common.log import set_cc_logger - - -class TACloudConnectClient(TaDataClient): - def __init__(self, - meta_config, - task_config, - checkpoint_mgr=None, - event_writer=None - ): - super(TACloudConnectClient, self).__init__(meta_config, - task_config, - checkpoint_mgr, - event_writer) - self._set_log() - self._cc_config_file = self._meta_config["cc_json_file"] - from ..core.pipemgr import PipeManager - from ..client import CloudConnectClient as Client - self._pipe_mgr = PipeManager(event_writer=event_writer) - self._client = Client(self._task_config, self._cc_config_file, - checkpoint_mgr) - - def _set_log(self): - pairs = ['{}="{}"'.format(c.stanza_name, self._task_config[ - c.stanza_name])] - set_cc_logger(stulog.logger, - logger_prefix="[{}]".format(" ".join(pairs))) - - def is_stopped(self): - return self._stop - - def stop(self): - self._stop = True - self._client.stop() - - def get(self): - self._client.start() - raise StopIteration diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/__init__.py deleted file mode 100755 index 46a5ea61bc..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = "0.9" -__license__ = "Splunk" diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/consts.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/consts.py deleted file mode 100755 index 32fb43865f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/consts.py +++ /dev/null @@ -1 +0,0 @@ -util_log = "util" diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/log.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/log.py deleted file mode 100755 index 87fe6516e6..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/log.py +++ /dev/null @@ -1,137 +0,0 @@ -""" -Copyright (C) 2005-2015 Splunk Inc. All Rights Reserved. - -log utility for TA -""" - -import logging -import logging.handlers as handlers -import os -import os.path as op - -from ..splunk_platform import make_splunkhome_path -from . import util as cutil -from .pattern import singleton -import time -logging.Formatter.converter = time.gmtime - -__LOG_FORMAT__ = "%(asctime)s +0000 log_level=%(levelname)s, pid=%(process)d, " \ - "tid=%(threadName)s, file=%(filename)s, " \ - "func_name=%(funcName)s, code_line_no=%(lineno)d | %(message)s" - - -def log_enter_exit(logger): - """ - Log decorator to log function enter and exit - """ - def log_decorator(func): - def wrapper(*args, **kwargs): - logger.debug("{} entered.".format(func.__name__)) - result = func(*args, **kwargs) - logger.debug("{} exited.".format(func.__name__)) - return result - return wrapper - return log_decorator - - -def check_add_stderr_handler(): - env_var = os.environ.get('splunk.cloudconnect.settings.logging.type') - return env_var and env_var == "stderr" - -@singleton -class Logs(object): - - def __init__(self, namespace=None, default_level=logging.INFO): - self._loggers = {} - self._default_level = default_level - if namespace is None: - namespace = cutil.get_appname_from_path(op.abspath(__file__)) - - if namespace: - namespace = namespace.lower() - self._namespace = namespace - - def get_logger(self, name, level=None, - maxBytes=25000000, backupCount=5): - """ - Set up a default logger. - - :param name: The log file name. - :param level: The logging level. - :param maxBytes: The maximum log file size before rollover. - :param backupCount: The number of log files to retain. - """ - - # Strip ".py" from the log file name if auto-generated by a script. - if level is None: - level = self._default_level - - name = self._get_log_name(name) - if name in self._loggers: - return self._loggers[name] - - logger = logging.getLogger(name) - - if check_add_stderr_handler(): - import sys - ch = logging.StreamHandler(sys.stderr) - ch.setLevel(logging.ERROR) - formatter = logging.Formatter(__LOG_FORMAT__) - ch.setFormatter(formatter) - logger.addHandler(ch) - else: - logfile = make_splunkhome_path(["var", "log", "splunk", name]) - handler_exists = any( - [True for h in logger.handlers if h.baseFilename == logfile]) - if not handler_exists: - file_handler = handlers.RotatingFileHandler( - logfile, mode="a", maxBytes=maxBytes, backupCount=backupCount) - formatter = logging.Formatter(__LOG_FORMAT__ ) - file_handler.setFormatter(formatter) - logger.addHandler(file_handler) - logger.setLevel(level) - logger.propagate = False - - self._loggers[name] = logger - return logger - - def set_level(self, level, name=None): - """ - Change the log level of the logging - - :param level: the level of the logging to be setLevel - :param name: the name of the logging to set, in case it is not set, - all the loggers will be affected - """ - - if name is not None: - name = self._get_log_name(name) - logger = self._loggers.get(name) - if logger is not None: - logger.setLevel(level) - else: - self._default_level = level - for logger in self._loggers.itervalues(): - logger.setLevel(level) - - def _get_log_name(self, name): - if name.endswith(".py"): - name = name.replace(".py", "") - - if self._namespace: - name = "{}_{}.log".format(self._namespace, name) - else: - name = "{}.log" .format(name) - return name - -# Global logger -logger = Logs().get_logger("util") - - -def reset_logger(name): - """ - Reset global logger. - """ - - global logger - logger = Logs().get_logger(name) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/pattern.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/pattern.py deleted file mode 100755 index 2edd2bba12..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/pattern.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Copyright (C) 2005-2015 Splunk Inc. All Rights Reserved. - -Commonly used design partten for python user, includes: - - singleton (Decorator function used to build singleton) -""" - -from functools import wraps - - -def singleton(class_): - """ - Singleton decoorator function. - """ - instances = {} - - @wraps(class_) - def getinstance(*args, **kwargs): - if class_ not in instances: - instances[class_] = class_(*args, **kwargs) - return instances[class_] - return getinstance - - -class Singleton(type): - """ - Singleton meta class - """ - - _instances = {} - - def __call__(cls, *args, **kwargs): - if cls not in cls._instances: - cls._instances[cls] = super(Singleton, cls).__call__( - *args, **kwargs) - print cls - return cls._instances[cls] diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/util.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/util.py deleted file mode 100755 index 15d172df92..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/util.py +++ /dev/null @@ -1,108 +0,0 @@ -""" -Copyright (C) 2005-2015 Splunk Inc. All Rights Reserved. -""" - -import os -import os.path as op -import datetime -import sys -import gc -import urllib - - -def handle_tear_down_signals(callback): - import signal - - signal.signal(signal.SIGTERM, callback) - signal.signal(signal.SIGINT, callback) - - if os.name == "nt": - signal.signal(signal.SIGBREAK, callback) - - -def datetime_to_seconds(dt): - epoch_time = datetime.datetime.utcfromtimestamp(0) - return (dt - epoch_time).total_seconds() - - -def is_true(val): - value = str(val).strip().upper() - if value in ("1", "TRUE", "T", "Y", "YES"): - return True - return False - - -def is_false(val): - value = str(val).strip().upper() - if value in ("0", "FALSE", "F", "N", "NO", "NONE", ""): - return True - return False - - -def remove_http_proxy_env_vars(): - for k in ("http_proxy", "https_proxy"): - if k in os.environ: - del os.environ[k] - elif k.upper() in os.environ: - del os.environ[k.upper()] - - -def get_appname_from_path(absolute_path): - absolute_path = op.normpath(absolute_path) - parts = absolute_path.split(os.path.sep) - parts.reverse() - for key in ("apps", "slave-apps", "master-apps"): - try: - idx = parts.index(key) - except ValueError: - continue - else: - try: - if parts[idx + 1] == "etc": - return parts[idx - 1] - except IndexError: - pass - continue - #return None - return "-" - - -def escape_cdata(data): - # FIXME: This is a workaround for JIRA [addon-10459] - data = data.decode("utf-8", errors="replace").encode("utf-8", errors="xmlcharrefreplace") - data = data.replace("]]>", "]]>") - if data.endswith("]"): - data = data[:-1] + "%5D" - return data - - -def extract_datainput_name(stanza_name): - """ - stansa_name: string like aws_s3://my_s3_data_input - """ - - sep = "://" - try: - idx = stanza_name.index(sep) - except ValueError: - return stanza_name - - return stanza_name[idx + len(sep):] - - -def escape_json_control_chars(json_str): - control_chars = ((r"\n", "\\\\n"), (r"\r", "\\\\r"), - (r"\r\n", "\\\\r\\\\n")) - for ch, replace in control_chars: - json_str = json_str.replace(ch, replace) - return json_str - - -def disable_stdout_buffer(): - os.environ["PYTHONUNBUFFERED"] = "1" - sys.stdout = os.fdopen(sys.stdout.fileno(), "w", 0) - gc.garbage.append(sys.stdout) - - -def format_stanza_name(name): - return urllib.quote(name.encode("utf-8"), "") diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/xml_dom_parser.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/xml_dom_parser.py deleted file mode 100755 index ae5a571cf3..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/common/xml_dom_parser.py +++ /dev/null @@ -1,47 +0,0 @@ -import re -from xml.etree import cElementTree as et - - -def parse_conf_xml_dom(xml_content): - """ - @xml_content: XML DOM from splunkd - """ - - m = re.search(r'xmlns="([^"]+)"', xml_content) - ns = m.group(1) - m = re.search(r'xmlns:s="([^"]+)"', xml_content) - sub_ns = m.group(1) - entry_path = "./{%s}entry" % ns - stanza_path = "./{%s}title" % ns - key_path = "./{%s}content/{%s}dict/{%s}key" % (ns, sub_ns, sub_ns) - meta_path = "./{%s}dict/{%s}key" % (sub_ns, sub_ns) - list_path = "./{%s}list/{%s}item" % (sub_ns, sub_ns) - - xml_conf = et.fromstring(xml_content) - stanza_objs = [] - for entry in xml_conf.iterfind(entry_path): - for stanza in entry.iterfind(stanza_path): - stanza_obj = {"name": stanza.text,"stanza": stanza.text} - break - else: - continue - - for key in entry.iterfind(key_path): - if key.get("name") == "eai:acl": - meta = {} - for k in key.iterfind(meta_path): - meta[k.get("name")] = k.text - stanza_obj[key.get("name")] = meta - elif key.get("name") != "eai:attributes": - name = key.get("name") - if name.startswith("eai:"): - name = name[4:] - list_vals = [k.text for k in key.iterfind(list_path)] - if list_vals: - stanza_obj[name] = list_vals - else: - stanza_obj[name] = key.text - if key.text == "None": - stanza_obj[name] = None - stanza_objs.append(stanza_obj) - return stanza_objs diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/concurrent_executor.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/concurrent_executor.py deleted file mode 100755 index d4ffd9dc79..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/concurrent_executor.py +++ /dev/null @@ -1,88 +0,0 @@ -""" -Concurrent executor provides concurrent executing function either in -a thread pool or a process pool -""" - -from ..concurrent import thread_pool as tp -from ..concurrent import process_pool as pp - - -class ConcurrentExecutor(object): - - def __init__(self, config): - """ - :param config: dict like object, contains thread_min_size (int), - thread_max_size (int), daemonize_thread (bool), - process_size (int) - """ - - self._io_executor = tp.ThreadPool(config.get("thread_min_size", 0), - config.get("thread_max_size", 0), - config.get("task_queue_size", 1024), - config.get("daemonize_thread", True)) - self._compute_executor = None - if config.get("process_size", 0): - self._compute_executor = pp.ProcessPool( - config.get("process_size", 0)) - - def start(self): - self._io_executor.start() - - def tear_down(self): - self._io_executor.tear_down() - if self._compute_executor is not None: - self._compute_executor.tear_down() - - def run_io_func_sync(self, func, args=(), kwargs=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :return whatever the func returns - """ - - return self._io_executor.apply(func, args, kwargs) - - def run_io_func_async(self, func, args=(), kwargs=None, callback=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :calllback: when func is done and without exception, call the callback - :return whatever the func returns - """ - - return self._io_executor.apply_async(func, args, kwargs, callback) - - def enqueue_io_funcs(self, funcs, block=True): - """ - run jobs in a fire and forget way, no result will be handled - over to clients - :param funcs: tuple/list-like or generator like object, func shall be - callable - """ - - return self._io_executor.enqueue_funcs(funcs, block) - - def run_compute_func_sync(self, func, args=(), kwargs={}): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :return whatever the func returns - """ - - assert self._compute_executor is not None - return self._compute_executor.apply(func, args, kwargs) - - def run_compute_func_async(self, func, args=(), kwargs={}, callback=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :calllback: when func is done and without exception, call the callback - :return whatever the func returns - """ - - assert self._compute_executor is not None - return self._compute_executor.apply_async(func, args, kwargs, callback) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/process_pool.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/process_pool.py deleted file mode 100755 index 1103b7778f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/process_pool.py +++ /dev/null @@ -1,63 +0,0 @@ -""" -A wrapper of multiprocessing.pool -""" - -import multiprocessing -from ..common import log - - -class ProcessPool(object): - """ - A simple wrapper of multiprocessing.pool - """ - - def __init__(self, size=0, maxtasksperchild=10000): - if size <= 0: - size = multiprocessing.cpu_count() - self.size = size - self._pool = multiprocessing.Pool(processes=size, - maxtasksperchild=maxtasksperchild) - self._stopped = False - - def tear_down(self): - """ - Tear down the pool - """ - - if self._stopped: - log.logger.info("ProcessPool has already stopped.") - return - self._stopped = True - - self._pool.close() - self._pool.join() - log.logger.info("ProcessPool stopped.") - - def apply(self, func, args=(), kwargs={}): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :return whatever the func returns - """ - - if self._stopped: - log.logger.info("ProcessPool has already stopped.") - return None - - return self._pool.apply(func, args, kwargs) - - def apply_async(self, func, args=(), kwargs={}, callback=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :callback: when func is done without exception, call this callack - :return whatever the func returns - """ - - if self._stopped: - log.logger.info("ProcessPool has already stopped.") - return None - - return self._pool.apply_async(func, args, kwargs, callback) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/thread_pool.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/thread_pool.py deleted file mode 100755 index 189006144f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/concurrent/thread_pool.py +++ /dev/null @@ -1,344 +0,0 @@ -""" -A simple thread pool implementation -""" - -import threading -import Queue -import multiprocessing -import traceback -import exceptions -from time import time - -from ..common import log - - -class ThreadPool(object): - """ - A simple thread pool implementation - """ - - _high_watermark = 0.2 - _resize_window = 10 - - def __init__(self, min_size=1, max_size=128, - task_queue_size=1024, daemon=True): - assert task_queue_size - - if not min_size or min_size <= 0: - min_size = multiprocessing.cpu_count() - - if not max_size or max_size <= 0: - max_size = multiprocessing.cpu_count() * 8 - - self._min_size = min_size - self._max_size = max_size - self._daemon = daemon - - self._work_queue = Queue.Queue(task_queue_size) - self._thrs = [] - for _ in range(min_size): - thr = threading.Thread(target=self._run) - self._thrs.append(thr) - self._admin_queue = Queue.Queue() - self._admin_thr = threading.Thread(target=self._do_admin) - self._last_resize_time = time() - self._last_size = min_size - self._lock = threading.Lock() - self._occupied_threads = 0 - self._count_lock = threading.Lock() - self._started = False - - def start(self): - """ - Start threads in the pool - """ - - with self._lock: - if self._started: - return - self._started = True - - for thr in self._thrs: - thr.daemon = self._daemon - thr.start() - - self._admin_thr.start() - log.logger.info("ThreadPool started.") - - def tear_down(self): - """ - Tear down thread pool - """ - - with self._lock: - if not self._started: - return - self._started = False - - for thr in self._thrs: - self._work_queue.put(None, block=True) - - self._admin_queue.put(None) - - if not self._daemon: - log.logger.info("Wait for threads to stop.") - for thr in self._thrs: - thr.join() - self._admin_thr.join() - - log.logger.info("ThreadPool stopped.") - - def enqueue_funcs(self, funcs, block=True): - """ - run jobs in a fire and forget way, no result will be handled - over to clients - :param funcs: tuple/list-like or generator like object, func shall be - callable - """ - - if not self._started: - log.logger.info("ThreadPool has already stopped.") - return - - for func in funcs: - self._work_queue.put(func, block) - - def apply_async(self, func, args=(), kwargs=None, callback=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :callback: when func is done and without exception, call the callback - :return AsyncResult, clients can poll or wait the result through it - """ - - if not self._started: - log.logger.info("ThreadPool has already stopped.") - return None - - res = AsyncResult(func, args, kwargs, callback) - self._work_queue.put(res) - return res - - def apply(self, func, args=(), kwargs=None): - """ - :param func: callable - :param args: free params - :param kwargs: named params - :return whatever the func returns - """ - - if not self._started: - log.logger.info("ThreadPool has already stopped.") - return None - - res = self.apply_async(func, args, kwargs) - return res.get() - - def size(self): - return self._last_size - - def resize(self, new_size): - """ - Resize the pool size, spawn or destroy threads if necessary - """ - - if new_size <= 0: - return - - if self._lock.locked() or not self._started: - log.logger.info("Try to resize thread pool during the tear " - "down process, do nothing") - return - - with self._lock: - self._remove_exited_threads_with_lock() - size = self._last_size - self._last_size = new_size - if new_size > size: - for _ in xrange(new_size - size): - thr = threading.Thread(target=self._run) - thr.daemon = self._daemon - thr.start() - self._thrs.append(thr) - elif new_size < size: - for _ in xrange(size - new_size): - self._work_queue.put(None) - log.logger.info("Finished ThreadPool resizing. New size=%d", new_size) - - def _remove_exited_threads_with_lock(self): - """ - Join the exited threads last time when resize was called - """ - - joined_thrs = set() - for thr in self._thrs: - if not thr.is_alive(): - try: - if not thr.daemon: - thr.join(timeout=0.5) - joined_thrs.add(thr.ident) - except RuntimeError: - pass - - if joined_thrs: - live_thrs = [] - for thr in self._thrs: - if thr.ident not in joined_thrs: - live_thrs.append(thr) - self._thrs = live_thrs - - def _do_resize_according_to_loads(self): - if (self._last_resize_time and - time() - self._last_resize_time < self._resize_window): - return - - thr_size = self._last_size - free_thrs = thr_size - self._occupied_threads - work_size = self._work_queue.qsize() - - log.logger.debug("current_thr_size=%s, free_thrs=%s, work_size=%s", - thr_size, free_thrs, work_size) - if work_size and work_size > free_thrs: - if thr_size < self._max_size: - thr_size = min(thr_size * 2, self._max_size) - self.resize(thr_size) - elif free_thrs > 0: - free = free_thrs * 1.0 - if free / thr_size >= self._high_watermark and free_thrs >= 2: - # 20 % thrs are idle, tear down half of the idle ones - thr_size = thr_size - free_thrs / 2 - if thr_size > self._min_size: - self.resize(thr_size) - self._last_resize_time = time() - - def _do_admin(self): - admin_q = self._admin_queue - resize_win = self._resize_window - while 1: - try: - wakup = admin_q.get(timeout=resize_win + 1) - except Queue.Empty: - self._do_resize_according_to_loads() - continue - - if wakup is None: - break - else: - self._do_resize_according_to_loads() - log.logger.info("ThreadPool admin thread=%s stopped.", - threading.current_thread().getName()) - - def _run(self): - """ - Threads callback func, run forever to handle jobs from the job queue - """ - - work_queue = self._work_queue - count_lock = self._count_lock - while 1: - log.logger.debug("Going to get job") - func = work_queue.get() - if func is None: - break - - if not self._started: - break - - log.logger.debug("Going to exec job") - with count_lock: - self._occupied_threads += 1 - - try: - func() - except Exception: - log.logger.error(traceback.format_exc()) - - with count_lock: - self._occupied_threads -= 1 - - log.logger.debug("Done with exec job") - log.logger.info("Thread work_queue_size=%d", work_queue.qsize()) - - log.logger.debug("Worker thread %s stopped.", - threading.current_thread().getName()) - - -class AsyncResult(object): - - def __init__(self, func, args, kwargs, callback): - self._func = func - self._args = args - self._kwargs = kwargs - self._callback = callback - self._q = Queue.Queue() - - def __call__(self): - try: - if self._args and self._kwargs: - res = self._func(*self._args, **self._kwargs) - elif self._args: - res = self._func(*self._args) - elif self._kwargs: - res = self._func(**self._kwargs) - else: - res = self._func() - except Exception as e: - self._q.put(e) - return - else: - self._q.put(res) - - if self._callback is not None: - self._callback() - - def get(self, timeout=None): - """ - Return the result when it arrives. If timeout is not None and the - result does not arrive within timeout seconds then - multiprocessing.TimeoutError is raised. If the remote call raised an - exception then that exception will be reraised by get(). - """ - - try: - res = self._q.get(timeout=timeout) - except Queue.Empty: - raise multiprocessing.TimeoutError("Timed out") - - if isinstance(res, Exception): - raise res - return res - - def wait(self, timeout=None): - """ - Wait until the result is available or until timeout seconds pass. - """ - - try: - res = self._q.get(timeout=timeout) - except Queue.Empty: - pass - else: - self._q.put(res) - - def ready(self): - """ - Return whether the call has completed. - """ - - return len(self._q) - - def successful(self): - """ - Return whether the call completed without raising an exception. - Will raise AssertionError if the result is not ready. - """ - - if not self.ready(): - raise exceptions.AssertionError("Function is not ready") - res = self._q.get() - self._q.put(res) - - if isinstance(res, Exception): - return False - return True diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_endpoints.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_endpoints.py deleted file mode 100755 index ed4be865db..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_endpoints.py +++ /dev/null @@ -1,142 +0,0 @@ -from .request import content_request -from ..common import util -from ..common import xml_dom_parser as xdp - -CONF_ENDPOINT = "%s/servicesNS/%s/%s/configs/conf-%s" - - -def _conf_endpoint_ns(uri, owner, app, conf_name): - return CONF_ENDPOINT % (uri, owner, app, conf_name) - - -def reload_conf(splunkd_uri, session_key, app_name, conf_name, throw=False): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param conf_names: a list of the name of the conf file, e.g. ["props"] - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - """ - - uri = _conf_endpoint_ns(splunkd_uri, "nobody", app_name, conf_name) - uri += "/_reload" - msg = "Failed to reload conf in app=%s: %s" % (app_name, conf_name) - - try: - content_request(uri, session_key, "GET", None, msg) - except Exception: - if throw: - raise - - -def create_stanza(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, key_values): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :param key_values: the key-value dict of the stanza - :return: None on success otherwise throw exception - """ - - uri = _conf_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - msg = "Failed to create stanza=%s in conf=%s" % (stanza, conf_name) - payload = {"name": unicode(stanza).encode('utf-8')} - for key in key_values: - if key != "name": - payload[key] = str(key_values[key]) - - content_request(uri, session_key, "POST", payload, msg) - - -def get_conf(splunkd_uri, session_key, owner, app_name, conf_name, - stanza=None): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :return: a list of stanzas in the conf file, including metadata - """ - - uri = _conf_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - - if stanza: - uri += "/" + util.format_stanza_name(stanza) - - # get all the stanzas at one time - uri += "?count=0&offset=0" - - msg = "Failed to get stanza=%s in conf=%s" % (stanza if stanza else stanza, conf_name) - content = content_request(uri, session_key, "GET", None, msg) - return xdp.parse_conf_xml_dom(content) - - -def update_stanza(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, key_values): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :param key_values: the key-value dict of the stanza - :return: None on success otherwise raise exception - """ - - uri = _conf_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - uri += "/" + util.format_stanza_name(stanza) - msg = "Failed to update stanza=%s in conf=%s" % (stanza, conf_name) - return content_request(uri, session_key, "POST", key_values, msg) - - -def delete_stanza(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, throw=False): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :return: None on success otherwise raise exception - """ - - uri = _conf_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - uri += "/" + util.format_stanza_name(stanza) - msg = "Failed to delete stanza=%s in conf=%s" % (stanza, conf_name) - content_request(uri, session_key, "DELETE", None, msg) - - -def stanza_exist(splunkd_uri, session_key, owner, app_name, conf_name, - stanza): - try: - res = get_conf(splunkd_uri, session_key, owner, app_name, conf_name, - stanza) - return len(res) > 0 - except Exception: - return False - - -def operate_conf(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, operation): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :param operation: must be "disable" or "enable" - """ - - assert operation in ("disable", "enable") - uri = _conf_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - uri += "/%s/%s" % (util.format_stanza_name(stanza), operation) - msg = "Failed to disable/enable stanza=%s in conf=%s" % (stanza, conf_name) - content_request(uri, session_key, "POST", None, msg) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_manager.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_manager.py deleted file mode 100755 index c399f5cbdf..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/conf_manager.py +++ /dev/null @@ -1,225 +0,0 @@ -""" -This module hanles configuration related stuff -""" - -import os.path as op - -from . import conf_endpoints as scmc -from . import data_input_endpoints as scmdi -from . import property_endpoints as scmp -from . import request as req - - -def conf_file2name(conf_file): - conf_name = op.basename(conf_file) - if conf_name.endswith(".conf"): - conf_name = conf_name[:-5] - return conf_name - - -class ConfManager(object): - - def __init__(self, splunkd_uri, session_key, owner="nobody", app_name="-"): - """ - :app_name: when creating conf stanza, app_name is required to set not - to "-" - :owner: when creating conf stanza, app_name is required to set not - to "-" - """ - - self.splunkd_uri = splunkd_uri - self.session_key = session_key - self.owner = owner - self.app_name = app_name - - def set_appname(self, appname): - """ - This are cases we need edit/remove/create confs in different app - context. call this interface to switch app context before manipulate - the confs in different app context - """ - - self.app_name = appname - - def all_stanzas(self, conf_name, do_reload=False, ret_metadata=False): - """ - :return: a list of dict stanza objects if successful. - Otherwise raise exception - """ - - if do_reload: - self.reload_conf(conf_name) - - stanzas = scmc.get_conf(self.splunkd_uri, self.session_key, - "-", "-", conf_name) - return self._delete_metadata(stanzas, ret_metadata) - - def all_stanzas_as_dicts(self, conf_name, do_reload=False, - ret_metadata=False): - """ - :return: a dict of dict stanza objects if successful. - otherwise raise exception - """ - - stanzas = self.all_stanzas(conf_name, do_reload, ret_metadata) - return {stanza["name"]: stanza for stanza in stanzas} - - def get_stanza(self, conf_name, stanza, - do_reload=False, ret_metadata=False): - """ - @return dict if success otherwise raise exception - """ - - if do_reload: - self.reload_conf(conf_name) - - stanzas = scmc.get_conf(self.splunkd_uri, self.session_key, - "-", "-", conf_name, stanza) - stanzas = self._delete_metadata(stanzas, ret_metadata) - return stanzas[0] - - def reload_conf(self, conf_name): - scmc.reload_conf(self.splunkd_uri, self.session_key, "-", conf_name) - - def enable_conf(self, conf_name, stanza): - scmc.operate_conf(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza, "enable") - - def disable_conf(self, conf_name, stanza): - scmc.operate_conf(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza, "disable") - - def get_property(self, conf_name, stanza, key, do_reload=False): - if do_reload: - self.reload_conf(conf_name) - - return scmp.get_property(self.splunkd_uri, self.session_key, - "-", "-", conf_name, stanza, key) - - def stanza_exist(self, conf_name, stanza): - return scmc.stanza_exist(self.splunkd_uri, self.session_key, - "-", "-", conf_name, stanza) - - def create_stanza(self, conf_name, stanza, key_values): - scmc.create_stanza(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza, key_values) - - def update_stanza(self, conf_name, stanza, key_values): - scmc.update_stanza(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza, key_values) - - def delete_stanza(self, conf_name, stanza): - scmc.delete_stanza(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza) - - def create_properties(self, conf_name, stanza): - scmp.create_properties(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza) - - def update_properties(self, conf_name, stanza, key_values): - scmp.update_properties(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - conf_name, stanza, key_values) - - def delete_stanzas(self, conf_name, stanzas): - """ - :param stanzas: list of stanzas - :return: list of failed stanzas - """ - - failed_stanzas = [] - for stanza in stanzas: - try: - self.delete_stanza(conf_name, stanza) - except Exception: - failed_stanzas.append(stanza) - return failed_stanzas - - # data input management - def create_data_input(self, input_type, name, key_values=None): - scmdi.create_data_input(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - input_type, name, key_values) - - def update_data_input(self, input_type, name, key_values): - scmdi.update_data_input(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - input_type, name, key_values) - - def delete_data_input(self, input_type, name): - scmdi.delete_data_input(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - input_type, name) - - def get_data_input(self, input_type, name=None, do_reload=False): - if do_reload: - self.reload_data_input(input_type) - - return scmdi.get_data_input(self.splunkd_uri, self.session_key, - "-", "-", input_type, name) - - def reload_data_input(self, input_type): - scmdi.reload_data_input(self.splunkd_uri, self.session_key, - "-", "-", input_type) - - def enable_data_input(self, input_type, name): - scmdi.operate_data_input(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - input_type, name, "enable") - - def disable_data_input(self, input_type, name): - scmdi.operate_data_input(self.splunkd_uri, self.session_key, - self.owner, self.app_name, - input_type, name, "disable") - - def data_input_exist(self, input_type, name): - try: - result = self.get_data_input(input_type, name) - except req.ConfNotExistsException: - return False - - return result is not None - - def all_data_input_stanzas(self, input_type, do_reload=False, - ret_metadata=False): - stanzas = self.get_data_input(input_type, do_reload=do_reload) - for stanza in stanzas: - if "eai:acl" in stanza and "app" in stanza["eai:acl"]: - stanza["appName"] = stanza["eai:acl"]["app"] - stanza["userName"] = stanza["eai:acl"].get("owner", "nobody") - return self._delete_metadata(stanzas, ret_metadata) - - def get_data_input_stanza(self, input_type, name, do_reload=False, - ret_metadata=False): - - stanzas = self.get_data_input(input_type, name, do_reload) - stanzas = self._delete_metadata(stanzas, ret_metadata) - return stanzas[0] - - def delete_data_input_stanzas(self, input_type, names): - """ - :param stanzas: list of stanzas - :return: list of failed stanzas - """ - - failed_names = [] - for name in names: - try: - self.delete_data_input(input_type, name) - except Exception: - failed_names.append(name) - return failed_names - - def _delete_metadata(self, stanzas, ret_metadata): - if stanzas and not ret_metadata: - for stanza in stanzas: - for key in stanza.keys(): - if key.startswith("eai:"): - del stanza[key] - return stanzas diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/data_input_endpoints.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/data_input_endpoints.py deleted file mode 100755 index b87959def2..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/data_input_endpoints.py +++ /dev/null @@ -1,152 +0,0 @@ -from .request import content_request -from ..common import util -from ..common import xml_dom_parser as xdp - -INPUT_ENDPOINT = "%s/servicesNS/%s/%s/data/inputs/%s" - - -def _input_endpoint_ns(uri, owner, app, input_type): - return INPUT_ENDPOINT % (uri, owner, app, input_type) - - -def reload_data_input(splunkd_uri, session_key, owner, app_name, - input_type, throw=False): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - """ - - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - uri += "/_reload" - msg = "Failed to reload data input in app=%s: %s" % (app_name, input_type) - try: - content_request(uri, session_key, "GET", None, msg) - except Exception: - if throw: - raise - - -def create_data_input(splunkd_uri, session_key, owner, app_name, input_type, - name, key_values): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - :param name: The name of the input stanza to create. - i.e. stanza [://] will be created. - :param key_values: a K-V dict of details in the data input stanza. - :return: None on success else raise exception - """ - - key_values["name"] = unicode(name).encode('utf-8') - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - msg = "Failed to create data input in app=%s: %s://%s" % ( - app_name, input_type, name) - content_request(uri, session_key, "POST", key_values, msg) - - -def get_data_input(splunkd_uri, session_key, owner, app_name, input_type, - name=None): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - :param name: The name of the input stanza to create. - i.e. stanza [://] will be deleted. - :return: a list of stanzas in the input type, including metadata - """ - - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - if name: - uri += "/" + util.format_stanza_name(name) - - # get all the stanzas at one time - uri += "?count=0&offset=0" - - msg = "Failed to get data input in app=%s: %s://%s" % ( - app_name, input_type, name if name else name) - content = content_request(uri, session_key, "GET", None, msg) - return xdp.parse_conf_xml_dom(content) - - -def update_data_input(splunkd_uri, session_key, owner, app_name, input_type, - name, key_values): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - :param name: The name of the input stanza to create. - i.e. stanza [://] will be updated. - :param key_values: a K-V dict of details in the data input stanza. - :return: raise exception when failure - """ - - if "name" in key_values: - del key_values["name"] - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - uri += "/" + util.format_stanza_name(name) - msg = "Failed to update data input in app=%s: %s://%s" % ( - app_name, input_type, name) - content_request(uri, session_key, "POST", key_values, msg) - - -def delete_data_input(splunkd_uri, session_key, owner, app_name, input_type, - name): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - :param name: The name of the input stanza to create. - i.e. stanza [://] will be deleted. - :return raise exception when failed - """ - - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - uri += "/" + util.format_stanza_name(name) - msg = "Failed to delete data input in app=%s: %s://%s" % ( - app_name, input_type, name) - content_request(uri, session_key, "DELETE", None, msg) - - -def operate_data_input(splunkd_uri, session_key, owner, app_name, - input_type, name, operation): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param input_type: name of the input type. - if it is a script input, the input is "script", - for modinput, say snow, the input is "snow" - :param name: The name of the input stanza to create. - i.e. stanza [://] will be operated. - :param operation: must be "disable" or "enable" - """ - - assert operation in ("disable", "enable") - uri = _input_endpoint_ns(splunkd_uri, owner, app_name, input_type) - uri += "/%s/%s" % (util.format_stanza_name(name), operation) - msg = "Failed to %s data input in app=%s: %s://%s" % ( - operation, app_name, input_type, name) - content_request(uri, session_key, "POST", None, msg) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/knowledge_objects.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/knowledge_objects.py deleted file mode 100755 index 2ca49d7a9d..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/knowledge_objects.py +++ /dev/null @@ -1,36 +0,0 @@ -from . import request as req -from ..common import xml_dom_parser as xdp - - -class KnowledgeObjectManager(object): - - def __init__(self, splunkd_uri, session_key): - self.splunkd_uri = splunkd_uri - self.session_key = session_key - - def apps(self): - """ - @return: a list of dict containing apps if successfuly otherwise - otherwise raise exceptions - """ - - uri = "{}/services/apps/local?count=0&offset=0".format( - self.splunkd_uri) - apps = self._do_request(uri, "GET", None, "Failed to get apps") - return apps - - def indexes(self): - """ - @return: a list of dict containing indexes if successfuly - otherwise raise exceptions - """ - - uri = "{}/services/data/indexes/?count=0&offset=0".format( - self.splunkd_uri) - indexes = self._do_request(uri, "GET", None, "Failed to get indexes") - return indexes - - def _do_request(self, uri, method, payload, err_msg): - _, content = req.content_request(uri, self.session_key, method, - payload, err_msg) - return xdp.parse_conf_xml_dom(content) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/property_endpoints.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/property_endpoints.py deleted file mode 100755 index a7249a33d1..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/property_endpoints.py +++ /dev/null @@ -1,78 +0,0 @@ -from .request import content_request -from ..common import util - - -PROPERTY_ENDPOINT = "%s/servicesNS/%s/%s/properties/%s" - - -def _property_endpoint_ns(uri, owner, app, conf_name): - return PROPERTY_ENDPOINT % (uri, owner, app, conf_name) - - -def create_properties(splunkd_uri, session_key, owner, app_name, conf_name, - stanza): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :return: None on success else raise exception - """ - - uri = _property_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - msg = "Properties: failed to create stanza=%s in conf=%s" % \ - (stanza, conf_name) - payload = {"__stanza": stanza} - content_request(uri, session_key, "POST", payload, msg) - - -def get_property(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, key): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :param key: the property name - :return: the property value - """ - - uri = _property_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - uri += "/%s/%s" % (util.format_stanza_name(stanza), key) - msg = "Properties: failed to get conf=%s, stanza=%s, key=%s" % \ - (conf_name, stanza, key) - return content_request(uri, session_key, "GET", None, msg) - - -def update_properties(splunkd_uri, session_key, owner, app_name, conf_name, - stanza, key_values): - """ - :param splunkd_uri: splunkd uri, e.g. https://127.0.0.1:8089 - :param session_key: splunkd session key - :param owner: the owner (ACL user), e.g. "-", "nobody" - :param app_name: the app"s name, e.g. "Splunk_TA_aws" - :param conf_name: the name of the conf file, e.g. "props" - :param stanza: stanza name, e.g. "aws:cloudtrail" - :param key_values: the key-value dict of the stanza - :return: raise exception when failed - """ - - uri = _property_endpoint_ns(splunkd_uri, owner, app_name, conf_name) - uri += "/" + util.format_stanza_name(stanza) - msg = "Properties: failed to update conf=%s, stanza=%s" % \ - (conf_name, stanza) - - has_name = False - if "name" in key_values: - has_name = True - name = key_values["name"] - del key_values["name"] - - content_request(uri, session_key, "POST", key_values, msg) - - if has_name: - key_values["name"] = name diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/request.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/request.py deleted file mode 100755 index f837173aa4..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/request.py +++ /dev/null @@ -1,44 +0,0 @@ -from .. import rest -from ..common import log - - -class ConfRequestException(Exception): - pass - - -class ConfNotExistsException(ConfRequestException): - pass - - -class ConfExistsException(ConfRequestException): - pass - - -def content_request(uri, session_key, method, payload, err_msg): - """ - :return: response content if successful otherwise raise - ConfRequestException - """ - - resp, content = rest.splunkd_request(uri, session_key, method, - data=payload, retry=3) - if resp is None and content is None: - return None - - if resp.status >= 200 and resp.status <= 204: - return content - else: - msg = "%s, status=%s, reason=%s, detail=%s" % ( - err_msg, resp.status, resp.reason, content.decode('utf-8')) - - if not (method == "GET" and resp.status == 404): - log.logger.error(msg) - - if resp.status == 404: - raise ConfNotExistsException(msg) - if resp.status == 409: - raise ConfExistsException(msg) - else: - if content and "already exists" in content: - raise ConfExistsException(msg) - raise ConfRequestException(msg) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/ta_conf_manager.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/ta_conf_manager.py deleted file mode 100755 index 0f2a225c2d..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/conf_manager/ta_conf_manager.py +++ /dev/null @@ -1,211 +0,0 @@ -""" -This module hanles high level TA configuration related stuff -""" - -import copy -import os.path as op - -from . import conf_manager as conf -from . import request as conf_req -from .. import credentials as cred -from ..common import util as utils - - -class TAConfManager(object): - - encrypted_token = "******" - reserved_keys = ("userName", "appName") - - def __init__(self, conf_file, splunkd_uri, session_key, appname=None): - if appname is None: - appname = utils.get_appname_from_path(op.abspath(__file__)) - self._conf_file = conf.conf_file2name(conf_file) - self._conf_mgr = conf.ConfManager(splunkd_uri, session_key, - app_name=appname) - self._cred_mgr = cred.CredentialManager( - splunkd_uri, session_key, app=appname, - owner="nobody", realm=appname) - self._keys = None - - def set_appname(self, appname): - """ - This are cases we need edit/remove/create confs in different app - context. call this interface to switch app context before manipulate - the confs in different app context - """ - - self._conf_mgr.set_appname(appname) - self._cred_mgr.set_appname(appname) - - def _delete_reserved_keys(self, stanza): - new_stanza = copy.deepcopy(stanza) - for k in self.reserved_keys: - if k in new_stanza: - del new_stanza[k] - return new_stanza - - def create(self, stanza): - """ - @stanza: dick like object - { - "name": xxx, - "k1": v1, - "k2": v2, - ... - } - @return exception if failure - """ - - stanza = self._delete_reserved_keys(stanza) - encrypted_stanza = self._encrypt(stanza) - self._conf_mgr.create_stanza(self._conf_file, - encrypted_stanza["name"], - encrypted_stanza) - - def update(self, stanza): - """ - @stanza: dick like object - { - "name": xxx, - "k1": v1, - "k2": v2, - ... - } - - @return: exception if failure - """ - - if not self._conf_mgr.stanza_exist(self._conf_file, stanza["name"]): - self.create(stanza) - else: - stanza = self._delete_reserved_keys(stanza) - encrypted_stanza = self._encrypt(stanza) - self._conf_mgr.update_properties( - self._conf_file, encrypted_stanza["name"], encrypted_stanza) - - def delete(self, stanza_name): - """ - @return: exception if failure - """ - - try: - stanza = self._conf_mgr.get_stanza(self._conf_file, stanza_name) - except conf_req.ConfNotExistsException: - return - - self._delete_creds(stanza) - self._conf_mgr.delete_stanza(self._conf_file, stanza_name) - - def get(self, stanza_name, return_acl=False): - """ - @return: dict object if sucess otherwise raise exception - """ - - stanza = self._conf_mgr.get_stanza(self._conf_file, stanza_name, - ret_metadata=return_acl) - stanza = self._decrypt(stanza) - stanza["disabled"] = utils.is_true(stanza.get("disabled")) - return stanza - - def all(self, filter_disabled=False, return_acl=True): - """ - @return: a dict of dict objects if success - otherwise exception - """ - - results = {} - stanzas = self._conf_mgr.all_stanzas(self._conf_file, - ret_metadata=return_acl) - for stanza in stanzas: - stanza = self._decrypt(stanza) - stanza["disabled"] = utils.is_true(stanza.get("disabled")) - if filter_disabled and stanza["disabled"]: - continue - results[stanza["name"]] = stanza - return results - - def reload(self): - self._conf_mgr.reload_conf(self._conf_file) - - def set_encrypt_keys(self, keys): - """ - :keys: a list keys of a stanza which need to be encrypted - for example: ["username", "password"] - """ - - self._keys = keys - - def is_encrypted(self, stanza): - """ - :stanza: dict object - return True if the values of encrypt keys equals self.encrypted_token - otherwise return False - """ - - if self._keys is None: - return False - - for k in stanza.iterkeys(): - if k in self._keys: - if stanza.get(k) == self.encrypted_token: - return True - return False - - def _encrypt(self, stanza): - """ - :stanza: if self._keys are in stanza, encrypt the values of the key - and then mask the value to self.encrypted_token - """ - - if self._keys is None: - return stanza - - stanza_to_be_encrypted = {} - for key in self._keys: - if key in stanza: - stanza_to_be_encrypted[key] = stanza[key] - - if stanza_to_be_encrypted: - self._cred_mgr.update({stanza["name"]: stanza_to_be_encrypted}) - encrypted_stanza = copy.deepcopy(stanza) - for key in stanza_to_be_encrypted.iterkeys(): - encrypted_stanza[key] = self.encrypted_token - return encrypted_stanza - return stanza - - def _decrypt(self, stanza): - """ - :stanza: if there are keys in self._keys in stanza and if the values of - the keys are self.encrypted_token, decrypt the value - """ - - if self._keys is None: - return stanza - - stanza_name = stanza["name"] - clear_password = None - for key in self._keys: - if key in stanza and stanza[key] == self.encrypted_token: - clear_password = self._cred_mgr.get_clear_password( - stanza_name) - break - - if clear_password: - for key in self._keys: - if key in clear_password[stanza_name]: - stanza[key] = clear_password[stanza_name][key] - return stanza - - def _delete_creds(self, stanza): - """ - :stanza: if there are keys of self._keys and the keys are in stanza, - delete the encrypted creds - """ - - if self._keys is None: - return - - for key in self._keys: - if key in stanza: - self._cred_mgr.delete(stanza["name"]) - break diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/credentials.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/credentials.py deleted file mode 100755 index 496e026003..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/credentials.py +++ /dev/null @@ -1,337 +0,0 @@ -""" -Handles credentials related stuff -""" - -import re -import xml.dom.minidom as xdm - -from . import rest -from .common import util -from .common import xml_dom_parser as xdp - -# Splunk can only encrypt string when length <=255 -SPLUNK_CRED_LEN_LIMIT = 255 - - -class CredException(Exception): - pass - - -class CredNotFound(CredException): - """ - Credential information not exists - """ - pass - - -def create_credential_manager(username, password, splunkd_uri, - app, owner, realm): - session_key = CredentialManager.get_session_key( - username, password, splunkd_uri) - return CredentialManager(splunkd_uri, session_key, app, owner, realm) - - -class CredentialManager(object): - """ - Credential related interfaces - """ - - def __init__(self, splunkd_uri, session_key, - app="-", owner="nobody", realm=None): - """ - :app: when creating/upating/deleting app is required - """ - - self._app = app - self._splunkd_uri = splunkd_uri - self._owner = owner - self._sep = "``splunk_cred_sep``" - - if realm: - self._realm = realm - else: - self._realm = app - - self._session_key = session_key - - def set_appname(self, app): - """ - This are cases we need edit/remove/create confs in different app - context. call this interface to switch app context before manipulate - the confs in different app context - """ - - self._app = app - - @staticmethod - def get_session_key(username, password, - splunkd_uri="https://localhost:8089"): - """ - Get session key by using login username and passwrod - :return: session_key if successful, None if failed - """ - - eid = "".join((splunkd_uri, "/services/auth/login")) - postargs = { - "username": username, - "password": password, - } - - response, content = rest.splunkd_request( - eid, None, method="POST", data=postargs) - - if response is None and content is None: - raise CredException("Get session key failed.") - - xml_obj = xdm.parseString(content) - session_nodes = xml_obj.getElementsByTagName("sessionKey") - if not session_nodes: - raise CredException("Invalid username or password.") - session_key = session_nodes[0].firstChild.nodeValue - if not session_key: - raise CredException("Get session key failed.") - return session_key - - def update(self, stanza): - """ - Update or Create credentials based on the stanza - :stanza: nested dict object. The outlayer keys are stanza name, and - inner dict is user/pass key/value pair to be encrypted - { - "stanza_name": {"tommy": "tommypasswod", "jerry": "jerrypassword"} - } - :return: raise on failure - """ - - for name, encr_dict in stanza.items(): - encrypts = [] - for key, val in encr_dict.items(): - encrypts.append(key) - encrypts.append(val) - self._update(name, self._sep.join(encrypts)) - - def _update(self, name, str_to_encrypt): - """ - Update the string for the name. - :return: raise on failure - """ - - self.delete(name) - - if len(str_to_encrypt) <= SPLUNK_CRED_LEN_LIMIT: - self._create(name, str_to_encrypt) - return - - # split the str_to_encrypt when len > 255 - length = SPLUNK_CRED_LEN_LIMIT - i = 0 - while length < len(str_to_encrypt) + SPLUNK_CRED_LEN_LIMIT: - curr_str = str_to_encrypt[length - SPLUNK_CRED_LEN_LIMIT:length] - length += SPLUNK_CRED_LEN_LIMIT - - stanza_name = self._sep.join((name, str(i))) - self._create(stanza_name, curr_str) - i += 1 - - def _create(self, name, str_to_encrypt): - """ - Create a new stored credential. - :return: raise on failure - """ - - payload = { - "name": name, - "password": str_to_encrypt, - "realm": self._realm, - } - - endpoint = self._get_endpoint(name) - resp, content = rest.splunkd_request(endpoint, self._session_key, - method="POST", data=payload) - if not resp or resp.status not in (200, 201, "200", "201"): - raise CredException("Failed to encrypt username {}".format(name)) - - def delete(self, name, throw=False): - """ - Delete the encrypted entry - """ - - try: - self._delete(name, throw=True) - except CredNotFound: - # try to delete the split stanzas - try: - stanzas = self._get_all_passwords() - except Exception: - raise - - ent_regx = "%s:(%s%s\d+):" % (self._realm, name, self._sep) - ent_pattern = re.compile(ent_regx) - for stanza in stanzas: - stanza_name = stanza.get("name") - match = ent_pattern.match(stanza_name) - if match: - try: - delete_name = match.group(1) - self._delete(delete_name, throw=True) - except CredNotFound: - pass - except CredException: - raise - except CredException: - raise - - def _delete(self, name, throw=False): - """ - Delete the encrypted entry - """ - - endpoint = self._get_endpoint(name) - response, content = rest.splunkd_request( - endpoint, self._session_key, method="DELETE") - - if response is not None and response.status in (404, "404"): - if throw: - raise CredNotFound( - "Credential stanza not exits - {}".format(name)) - elif not response or response.status not in (200, 201, "200", "201"): - if throw: - raise CredException( - "Failed to delete credential stanza {}".format(name)) - - def get_all_passwords(self): - results = {} - all_stanzas = self._get_all_passwords() - for stanza in all_stanzas: - name = stanza.get("name") - match = re.match(r"(.+){}(\d+)".format(self._sep), name) - if match: - actual_name = match.group(1) + ":" - index = int(match.group(2)) - if results.get(actual_name): - exist_stanza = results.get(actual_name) - else: - exist_stanza = stanza - exist_stanza['name'] = actual_name - exist_stanza['username'] = \ - exist_stanza['username'].split(self._sep)[0] - exist_stanza['clears'] = {} - exist_stanza['encrs'] = {} - - try: - exist_stanza['clears'][index] = stanza.get('clear_password') - exist_stanza['encrs'][index] = stanza.get('encr_password') - except KeyError: - exist_stanza['clears'] = {} - exist_stanza['encrs'] = {} - exist_stanza['clears'][index] = stanza.get('clear_password') - exist_stanza['encrs'][index] = stanza.get('encr_password') - - results[actual_name] = exist_stanza - - else: - results[name] = stanza - - # merge the stanzas by index - for name, stanza in results.items(): - field_clear = stanza.get('clears') - field_encr = stanza.get('encrs') - if isinstance(field_clear, dict): - clear_password = "" - encr_password = "" - for index in sorted(field_clear.keys()): - clear_password += field_clear.get(index) - encr_password += field_encr.get(index) - stanza['clear_password'] = clear_password - stanza['encr_password'] = encr_password - - del stanza['clears'] - del stanza['encrs'] - return results.values() - - def _get_all_passwords(self): - """ - :return: a list of dict when successful, None when failed. - the dict at least contains - { - "realm": xxx, - "username": yyy, - "clear_password": zzz, - } - """ - - endpoint = self._get_endpoint() - response, content = rest.splunkd_request( - endpoint, self._session_key, method="GET") - if response and response.status in (200, 201, "200", "201") and content: - return xdp.parse_conf_xml_dom(content) - raise CredException("Failed to get credentials") - - def get_clear_password(self, name=None): - """ - :return: clear password(s) - { - stanza_name: {"user": pass} - } - """ - - return self._get_credentials("clear_password", name) - - def get_encrypted_password(self, name=None): - """ - :return: encyrpted password(s) - """ - - return self._get_credentials("encr_password", name) - - def _get_credentials(self, prop, name=None): - """ - :return: clear or encrypted password for specified realm, user - """ - - all_stanzas = self.get_all_passwords() - results = {} - - for stanza in all_stanzas: - if name and not stanza.get("name").endswith(":" + name + ":"): - continue - if stanza.get("realm") == self._realm: - values = stanza[prop].split(self._sep) - if len(values) % 2 == 1: - continue - result = {values[i]: values[i + 1] - for i in range(0, len(values), 2)} - results[stanza.get("username")] = result - return results - - @staticmethod - def _build_name(realm, name): - return util.format_stanza_name( - "".join((CredentialManager._escape_string(realm), ":", - CredentialManager._escape_string(name), ":"))) - - @staticmethod - def _escape_string(string_to_escape): - r""" - Splunk secure credential storage actually requires a custom style of - escaped string where all the :'s are escaped by a single \. - But don't escape the control : in the stanza name. - """ - - return string_to_escape.replace(":", "\\:") - - def _get_endpoint(self, name=None, query=False): - app = self._app - owner = self._owner - if query: - app = "-" - owner = "-" - - if name: - realm_user = self._build_name(self._realm, name) - rest_endpoint = "{}/servicesNS/{}/{}/storage/passwords/{}".format( - self._splunkd_uri, owner, app, realm_user) - else: - rest_endpoint = "{}/servicesNS/{}/{}/storage/passwords?count=-1" \ - "".format(self._splunkd_uri, owner, app) - return rest_endpoint diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/event_writer.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/event_writer.py deleted file mode 100755 index 4078fec29f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/event_writer.py +++ /dev/null @@ -1,84 +0,0 @@ -import Queue -import multiprocessing -import threading -import sys -from collections import Iterable -from .common import log - - -class EventWriter(object): - - def __init__(self, process_safe=False): - if process_safe: - self._mgr = multiprocessing.Manager() - self._event_queue = self._mgr.Queue(1000) - else: - self._event_queue = Queue.Queue(1000) - self._event_writer = threading.Thread(target=self._do_write_events) - self._event_writer.daemon = True - self._started = False - self._exception = False - - def start(self): - if self._started: - return - self._started = True - - self._event_writer.start() - log.logger.info("Event writer started.") - - def tear_down(self): - if not self._started: - return - self._started = False - - self._event_queue.put(None) - self._event_writer.join() - log.logger.info("Event writer stopped.") - - def isopen(self): - return self._started and (not self._exception) - - def write_events(self, events): - if not self.isopen(): - return False - if events is None: - return True - self._event_queue.put(events) - return True - - def _do_write_events(self): - event_queue = self._event_queue - write = sys.stdout.write - got_shutdown_signal = False - - while 1: - try: - event = event_queue.get(timeout=3) - if event is not None: - if isinstance(event, basestring): - write(event) - elif isinstance(event, Iterable): - for evt in event: - write(evt) - else: - log.logger.info("Event writer got tear down signal") - got_shutdown_signal = True - except Queue.Empty: - # We need drain the queue before shutdown - # timeout means empty for now - if got_shutdown_signal: - log.logger.info("Event writer is going to exit...") - break - else: - continue - except Exception: - log.logger.exception("EventWriter encounter exception which may" - "cause data loss, queue leftsize={" - "}".format( - event_queue.qsize())) - self._exception = True - break - - log.logger.info("Event writer stopped, queue leftsize={}".format( - event_queue.qsize())) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/file_monitor.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/file_monitor.py deleted file mode 100755 index 937e2d1735..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/file_monitor.py +++ /dev/null @@ -1,56 +0,0 @@ -import os.path as op -import traceback - -from .common import log - - -class FileMonitor(object): - - def __init__(self, callback, files): - """ - :files: files to be monidtored with full path - """ - - self._callback = callback - self._files = files - - self.file_mtimes = { - file_name: None for file_name in self._files - } - for k in self.file_mtimes: - if not op.exists(k): - continue - - try: - if not op.exists(k): - continue - self.file_mtimes[k] = op.getmtime(k) - except OSError: - log.logger.error("Getmtime for %s, failed: %s", - k, traceback.format_exc()) - - def __call__(self): - return self.check_changes() - - def check_changes(self): - log.logger.debug("Checking files=%s", self._files) - file_mtimes = self.file_mtimes - changed_files = [] - for f, last_mtime in file_mtimes.iteritems(): - try: - if not op.exists(f): - continue - - current_mtime = op.getmtime(f) - if current_mtime != last_mtime: - file_mtimes[f] = current_mtime - changed_files.append(f) - log.logger.info("Detect %s has changed", f) - except OSError: - pass - - if changed_files: - if self._callback: - self._callback(changed_files) - return True - return False diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/kv_client.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/kv_client.py deleted file mode 100755 index 2d4562138d..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/kv_client.py +++ /dev/null @@ -1,202 +0,0 @@ -import re -import json -from xml.etree import cElementTree as et - -from . import rest as rest - - -class KVException(Exception): - pass - - -class KVAlreadyExists(KVException): - pass - - -class KVNotExists(KVException): - pass - - -class KVClient(object): - - def __init__(self, splunkd_host, session_key): - self._splunkd_host = splunkd_host - self._session_key = session_key - - def create_collection(self, collection, app, owner="nobody"): - """ - :collection: collection name - :return: None if successful otherwise KV exception thrown - """ - - assert collection - assert app - - uri = self._get_config_endpoint(app, owner) - data = { - "name": collection - } - self._do_request(uri, "POST", data) - - def list_collection(self, collection=None, app=None, owner="nobody"): - """ - :collection: collection name. When euqals "None", return all - collections in the system. - :return: a list containing the connection names if successful, throws - KVNotExists if no such colection or other exception if other error - happened - """ - - uri = self._get_config_endpoint(app, owner, collection) - - content = self._do_request(uri, method="GET") - m = re.search(r'xmlns="([^"]+)"', content) - path = "./entry/title" - if m: - ns = m.group(1) - path = "./{%s}entry/{%s}title" % (ns, ns) - - collections = et.fromstring(content) - return [node.text for node in collections.iterfind(path)] - - def delete_collection(self, collection, app, owner="nobody"): - """ - :collection: collection name to be deleted - :return: None if successful otherwise throw KVNotExists exception if - the collection doesn't exist in the system or other exception if other - error happened - """ - - assert collection - - uri = self._get_config_endpoint(app, owner, collection) - self._do_request(uri, method="DELETE") - - def insert_collection_data(self, collection, data, app, owner="nobody"): - """ - :collection: collection name - :data: dict like key values to be inserted and attached to - this collection - :return: {"_key": "key_id"} when successful, clients can use this - key to do query/delete/update, throws KV exceptions when failed - """ - - assert collection - assert data is not None - assert app - - uri = self._get_data_endpoint(app, owner, collection) - key = self._do_request(uri, "POST", data, - content_type="application/json") - return json.loads(key) - - def delete_collection_data(self, collection, key_id, app, owner="nobody"): - """ - :collection: collection name - :key_id: key id returned when creation. If None, delete all data - associated with this collection - :return: None if successful otherwise throws KV exception - """ - - assert collection - - uri = self._get_data_endpoint(app, owner, collection, key_id) - self._do_request(uri, "DELETE", content_type="application/json") - - def update_collection_data(self, collection, key_id, data, - app, owner="nobody"): - """ - :collection: collection name - :key_id: key id returned when creation - :return: key id if successful otherwise throws KV exception - """ - - assert collection - assert key_id - assert app - - uri = self._get_data_endpoint(app, owner, collection, key_id) - k = self._do_request(uri, "POST", data, - content_type="application/json") - return json.loads(k) - - def get_collection_data(self, collection, key_id, app, owner="nobody"): - """ - :collection: collection name - :key_id: key id returned when creation. If None, get all data - associated with this collection - :return: when key_id is not None, return key values if - successful. when key_id is None, return a list of key values if - sucessful. Throws KV exception if failure - """ - - assert collection - - uri = self._get_data_endpoint(app, owner, collection, key_id) - k = self._do_request(uri, "GET") - return json.loads(k) - - def _do_request(self, uri, method, data=None, - content_type="application/x-www-form-urlencoded"): - headers = {"Content-Type": content_type} - - resp, content = rest.splunkd_request(uri, self._session_key, - method, headers, data) - if resp is None and content is None: - raise KVException("Failed uri={0}, data={1}".format(uri, data)) - - if resp.status in (200, 201): - return content - elif resp.status == 409: - raise KVAlreadyExists("{0}-{1} already exists".format(uri, data)) - elif resp.status == 404: - raise KVNotExists("{0}-{1} not exists".format(uri, data)) - else: - raise KVException("Failed to {0} {1}, reason={2}".format( - method, uri, resp.reason)) - - def _get_config_endpoint(self, app, owner, collection=None): - uri = "{0}/servicesNS/{1}/{2}/storage/collections/config" - return self._do_get_endpoint(app, owner, collection, None, uri) - - def _get_data_endpoint(self, app, owner, collection, key_id=None): - uri = "{0}/servicesNS/{1}/{2}/storage/collections/data" - return self._do_get_endpoint(app, owner, collection, key_id, uri) - - def _do_get_endpoint(self, app, owner, collection, key_id, uri_template): - if not app: - app = "-" - - if not owner: - owner = "-" - - uri = uri_template.format(self._splunkd_host, owner, app) - - if collection is not None: - uri += "/{0}".format(collection) - if key_id is not None: - uri += "/{0}".format(key_id) - return uri - - -def create_collection(kv_client, collection, appname): - not_exists = False - try: - res = kv_client.list_collection(collection, appname) - except KVNotExists: - not_exists = True - except Exception: - not_exists = True - - if not_exists or not res: - for i in xrange(3): - try: - kv_client.create_collection(collection, appname) - except KVAlreadyExists: - return - except Exception as e: - ex = e - else: - return - else: - raise ex diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/modinput.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/modinput.py deleted file mode 100755 index 3f626f25e6..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/modinput.py +++ /dev/null @@ -1,147 +0,0 @@ -import sys -import subprocess -import traceback - -from . import splunk_platform as sp -from .common import log - - -def _parse_modinput_configs(root, outer_block, inner_block): - """ - When user splunkd spawns modinput script to do config check or run - - - - localhost.localdomain - https://127.0.0.1:8089 - xxxyyyzzz - ckpt_dir - - - 60 - localhost.localdomain - snow - 10 - - ... - - - - When user create an stanza through data input on WebUI - - - - localhost.localdomain - https://127.0.0.1:8089 - xxxyyyzzz - ckpt_dir - - 60 - - localhost.localdomain - snow - 10 - - - """ - - confs = root.getElementsByTagName(outer_block) - if not confs: - log.logger.error("Invalid config, missing %s section", outer_block) - raise Exception("Invalid config, missing %s section".format( - outer_block - )) - - configs = [] - stanzas = confs[0].getElementsByTagName(inner_block) - for stanza in stanzas: - config = {} - stanza_name = stanza.getAttribute("name") - if not stanza_name: - log.logger.error("Invalid config, missing name") - raise Exception("Invalid config, missing name") - - config["name"] = stanza_name - params = stanza.getElementsByTagName("param") - for param in params: - name = param.getAttribute("name") - if (name and param.firstChild and - param.firstChild.nodeType == param.firstChild.TEXT_NODE): - config[name] = param.firstChild.data - configs.append(config) - return configs - - -def parse_modinput_configs(config_str): - """ - @config_str: modinput XML configuration feed by splunkd - @return: meta_config and stanza_config - """ - - import xml.dom.minidom as xdm - - meta_configs = { - "server_host": None, - "server_uri": None, - "session_key": None, - "checkpoint_dir": None, - } - root = xdm.parseString(config_str) - doc = root.documentElement - for tag in meta_configs.iterkeys(): - nodes = doc.getElementsByTagName(tag) - if not nodes: - log.logger.error("Invalid config, missing %s section", tag) - raise Exception("Invalid config, missing %s section", tag) - - if (nodes[0].firstChild and - nodes[0].firstChild.nodeType == nodes[0].TEXT_NODE): - meta_configs[tag] = nodes[0].firstChild.data - else: - log.logger.error("Invalid config, expect text ndoe") - raise Exception("Invalid config, expect text ndoe") - - if doc.nodeName == "input": - configs = _parse_modinput_configs(doc, "configuration", "stanza") - else: - configs = _parse_modinput_configs(root, "items", "item") - return meta_configs, configs - - -def get_modinput_configs_from_cli(modinput, modinput_stanza=None): - """ - @modinput: modinput name - @modinput_stanza: modinput stanza name, for multiple instance only - """ - - assert modinput - - splunkbin = sp.get_splunk_bin() - cli = [splunkbin, "cmd", "splunkd", "print-modinput-config", modinput] - if modinput_stanza: - cli.append(modinput_stanza) - - out, err = subprocess.Popen(cli, stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate() - if err: - log.logger.error("Failed to get modinput configs with error: %s", err) - return None, None - else: - return parse_modinput_configs(out) - - -def get_modinput_config_str_from_stdin(): - """ - Get modinput from stdin which is feed by splunkd - """ - - try: - return sys.stdin.read(5000) - except Exception: - log.logger.error(traceback.format_exc()) - raise - - -def get_modinput_configs_from_stdin(): - config_str = get_modinput_config_str_from_stdin() - return parse_modinput_configs(config_str) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/orphan_process_monitor.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/orphan_process_monitor.py deleted file mode 100755 index 19ae70e46b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/orphan_process_monitor.py +++ /dev/null @@ -1,65 +0,0 @@ -import os -import threading -import time -import traceback - -from ..splunktalib.common import log - - -class OrphanProcessChecker(object): - - def __init__(self, callback=None): - """ - Only work for Linux platform. On Windows platform, is_orphan is always - False - """ - - if os.name == "nt": - self._ppid = 0 - else: - self._ppid = os.getppid() - self._callback = callback - - def is_orphan(self): - if os.name == "nt": - return False - res = self._ppid != os.getppid() - if res: - log.logger.warn("Process=%s has become orphan", os.getpid()) - return res - - def check_orphan(self): - res = self.is_orphan() - if res and self._callback: - self._callback() - return res - - -class OrphanProcessMonitor(object): - - def __init__(self, callback): - self._checker = OrphanProcessChecker(callback) - self._thr = threading.Thread(target=self._do_monitor) - self._thr.daemon = True - self._started = False - - def start(self): - if self._started: - return - self._started = True - - self._thr.start() - - def stop(self): - self._started = False - - def _do_monitor(self): - while self._started: - try: - res = self._checker.check_orphan() - if res: - break - time.sleep(1) - except Exception: - log.logger.error("Failed to monitor orphan process, reason=%s", - traceback.format_exc()) diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/rest.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/rest.py deleted file mode 100755 index a69e7326dc..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/rest.py +++ /dev/null @@ -1,122 +0,0 @@ -import urllib -import json -from traceback import format_exc - -from .common import util as scu -from .common import log as log - - -from httplib2 import (socks, ProxyInfo, Http) - - -def splunkd_request(splunkd_uri, session_key, method="GET", - headers=None, data=None, timeout=30, retry=1): - """ - :return: httplib2.Response and content - """ - - headers = headers if headers is not None else {} - headers["Authorization"] = "Splunk {0}".format(session_key) - content_type = headers.get("Content-Type") - if not content_type: - content_type = headers.get("content-type") - - if not content_type: - content_type = "application/x-www-form-urlencoded" - headers["Content-Type"] = content_type - - if data is not None: - if content_type == "application/json": - data = json.dumps(data) - else: - data = urllib.urlencode(data) - - http = Http(timeout=timeout, disable_ssl_certificate_validation=True) - msg_temp = "Failed to send rest request=%s, errcode=%s, reason=%s" - resp, content = None, None - for _ in range(retry): - try: - resp, content = http.request(splunkd_uri, method=method, - headers=headers, body=data) - except Exception: - log.logger.error(msg_temp, splunkd_uri, "unknown", format_exc()) - else: - if resp.status not in (200, 201): - if not (method == "GET" and resp.status == 404): - log.logger.debug(msg_temp, splunkd_uri, resp.status, - code_to_msg(resp, content)) - else: - return resp, content - else: - return resp, content - - -def code_to_msg(resp, content): - code_msg_tbl = { - 400: "Request error. reason={}".format(content), - 401: "Authentication failure, invalid access credentials.", - 402: "In-use license disables this feature.", - 403: "Insufficient permission.", - 404: "Requested endpoint does not exist.", - 409: "Invalid operation for this endpoint. reason={}".format(content), - 500: "Unspecified internal server error. reason={}".format(content), - 503: ("Feature is disabled in the configuration file. " - "reason={}".format(content)), - } - - return code_msg_tbl.get(resp.status, content) - - -def build_http_connection(config, timeout=120, disable_ssl_validation=False): - """ - :config: dict like, proxy and account information are in the following - format { - "username": xx, - "password": yy, - "proxy_url": zz, - "proxy_port": aa, - "proxy_username": bb, - "proxy_password": cc, - "proxy_type": http,http_no_tunnel,sock4,sock5, - "proxy_rdns": 0 or 1, - } - :return: Http2.Http object - """ - - proxy_type_to_code = { - "http": socks.PROXY_TYPE_HTTP, - "http_no_tunnel": socks.PROXY_TYPE_HTTP_NO_TUNNEL, - "socks4": socks.PROXY_TYPE_SOCKS4, - "socks5": socks.PROXY_TYPE_SOCKS5, - } - if config.get("proxy_type") in proxy_type_to_code: - proxy_type = proxy_type_to_code[config["proxy_type"]] - else: - proxy_type = socks.PROXY_TYPE_HTTP - - rdns = scu.is_true(config.get("proxy_rdns")) - - proxy_info = None - if config.get("proxy_url") and config.get("proxy_port"): - if config.get("proxy_username") and config.get("proxy_password"): - proxy_info = ProxyInfo(proxy_type=proxy_type, - proxy_host=config["proxy_url"], - proxy_port=int(config["proxy_port"]), - proxy_user=config["proxy_username"], - proxy_pass=config["proxy_password"], - proxy_rdns=rdns) - else: - proxy_info = ProxyInfo(proxy_type=proxy_type, - proxy_host=config["proxy_url"], - proxy_port=int(config["proxy_port"]), - proxy_rdns=rdns) - if proxy_info: - http = Http(proxy_info=proxy_info, timeout=timeout, - disable_ssl_certificate_validation=disable_ssl_validation) - else: - http = Http(timeout=timeout, - disable_ssl_certificate_validation=disable_ssl_validation) - - if config.get("username") and config.get("password"): - http.add_credentials(config["username"], config["password"]) - return http diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/__init__.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/__init__.py deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/job.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/job.py deleted file mode 100755 index 3ea9ffbbca..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/job.py +++ /dev/null @@ -1,90 +0,0 @@ -import threading -import time - - -class Job(object): - """ - Timer wraps the callback and timestamp related stuff - """ - - _ident = 0 - _lock = threading.Lock() - - def __init__(self, func, job_props, interval, when=None, job_id=None): - """ - @job_props: dict like object - @func: execution function - @interval: execution interval - @when: seconds from epoch - @job_id: a unique id for the job - """ - - self._props = job_props - self._func = func - if when is None: - self._when = time.time() - else: - self._when = when - self._interval = interval - - if job_id is not None: - self._id = job_id - else: - with Job._lock: - self._id = Job._ident + 1 - Job._ident = Job._ident + 1 - self._stopped = False - - def ident(self): - return self._id - - def get_interval(self): - return self._interval - - def set_interval(self, interval): - self._interval = interval - - def get_expiration(self): - return self._when - - def set_initial_due_time(self, when): - if self._when is None: - self._when = when - - def update_expiration(self): - self._when += self._interval - - def get(self, key, default): - return self._props.get(key, default) - - def get_props(self): - return self._props - - def set_props(self, props): - self._props = props - - def __cmp__(self, other): - if other is None: - return 1 - - self_k = (self.get_expiration(), self.ident()) - other_k = (other.get_expiration(), other.ident()) - - if self_k == other_k: - return 0 - elif self_k < other_k: - return -1 - else: - return 1 - - def __eq__(self, other): - return isinstance(other, Job) and (self.ident() == other.ident()) - - def __call__(self): - self._func(self) - - def stop(self): - self._stopped = True - - def stopped(self): - return self._stopped diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/scheduler.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/scheduler.py deleted file mode 100755 index adceae6f2b..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/schedule/scheduler.py +++ /dev/null @@ -1,143 +0,0 @@ -import threading -from time import time -import random -import Queue -from ..common import log - - -class Scheduler(object): - """ - A simple scheduler which schedules the periodic or once event - """ - - import sortedcontainers as sc - - max_delay_time = 60 - - def __init__(self): - self._jobs = Scheduler.sc.SortedSet() - self._wakeup_q = Queue.Queue() - self._lock = threading.Lock() - self._thr = threading.Thread(target=self._do_jobs) - self._thr.deamon = True - self._started = False - - def start(self): - """ - Start the schduler which will start the internal thread for scheduling - jobs. Please do tear_down when doing cleanup - """ - - if self._started: - log.logger.info("Scheduler already started.") - return - self._started = True - - self._thr.start() - - def tear_down(self): - """ - Stop the schduler which will stop the internal thread for scheduling - jobs. - """ - - if not self._started: - log.logger.info("Scheduler already tear down.") - return - - self._wakeup_q.put(True) - - def _do_jobs(self): - while 1: - (sleep_time, jobs) = self.get_ready_jobs() - self._do_execution(jobs) - try: - done = self._wakeup_q.get(timeout=sleep_time) - except Queue.Empty: - pass - else: - if done: - break - self._started = False - log.logger.info("Scheduler exited.") - - def get_ready_jobs(self): - """ - @return: a 2 element tuple. The first element is the next ready - duration. The second element is ready jobs list - """ - - now = time() - ready_jobs = [] - sleep_time = 1 - - with self._lock: - job_set = self._jobs - total_jobs = len(job_set) - for job in job_set: - if job.get_expiration() <= now: - ready_jobs.append(job) - - if ready_jobs: - del job_set[:len(ready_jobs)] - - for job in ready_jobs: - if job.get_interval() != 0 and not job.stopped(): - # repeated job, calculate next due time and enqueue - job.update_expiration() - job_set.add(job) - - if job_set: - sleep_time = job_set[0].get_expiration() - now - if sleep_time < 0: - log.logger.warn("Scheduler satuation, sleep_time=%s", - sleep_time) - sleep_time = 0.1 - - if ready_jobs: - log.logger.info("Get %d ready jobs, next duration is %f, " - "and there are %s jobs scheduling", - len(ready_jobs), sleep_time, total_jobs) - - ready_jobs.sort(key=lambda job: job.get("priority", 0), reverse=True) - return (sleep_time, ready_jobs) - - def add_jobs(self, jobs): - with self._lock: - now = time() - job_set = self._jobs - for job in jobs: - delay_time = random.randrange(0, self.max_delay_time) - job.set_initial_due_time(now + delay_time) - job_set.add(job) - self._wakeup() - - def update_jobs(self, jobs): - with self._lock: - job_set = self._jobs - for njob in jobs: - job_set.discard(njob) - job_set.add(njob) - self._wakeup() - - def remove_jobs(self, jobs): - with self._lock: - job_set = self._jobs - for njob in jobs: - njob.stop() - job_set.discard(njob) - self._wakeup() - - def number_of_jobs(self): - with self._lock: - return len(self._jobs) - - def disable_randomization(self): - self.max_delay_time = 1 - - def _wakeup(self): - self._wakeup_q.put(None) - - def _do_execution(self, jobs): - for job in jobs: - job() diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/setting.conf b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/setting.conf deleted file mode 100755 index f7973ad81f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/setting.conf +++ /dev/null @@ -1,5 +0,0 @@ -[global] -process_size = 0 -thread_min_size = 4 -thread_max_size = 128 -task_queue_size = 1024 diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_cluster.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_cluster.py deleted file mode 100755 index c12e8847fa..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_cluster.py +++ /dev/null @@ -1,53 +0,0 @@ -from ..splunktalib import rest -from ..splunktalib.common import xml_dom_parser as xdp - - -def _do_rest(uri, session_key): - resp, content = rest.splunkd_request(uri, session_key) - if resp is None: - return None - - if resp.status not in (200, 201): - return None - - stanza_objs = xdp.parse_conf_xml_dom(content) - if not stanza_objs: - return None - - return stanza_objs[0] - - -class ServerInfo(object): - - def __init__(self, splunkd_uri, session_key): - uri = "{}/services/server/info".format(splunkd_uri) - server_info = _do_rest(uri, session_key) - if server_info is None: - raise Exception("Failed to init ServerInfo") - - self._server_info = server_info - - def is_captain(self): - """ - :return: True if splunkd_uri is captain otherwise False - """ - - return "shc_captain" in self._server_info["server_roles"] - - def is_search_head(self): - for sh in ("search_head", "cluster_search_head"): - if sh in self._server_info["server_roles"]: - return True - return False - - def is_shc_member(self): - server_roles = self._server_info['server_roles'] - return any( - role in server_roles for role in ('shc_member', 'shc_captain') - ) - - def version(self): - return self._server_info["version"] - - def to_dict(self): - return self._server_info diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_platform.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_platform.py deleted file mode 100755 index d59afd06c5..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/splunk_platform.py +++ /dev/null @@ -1,104 +0,0 @@ -import os -import os.path as op -import subprocess -from ConfigParser import ConfigParser -from cStringIO import StringIO - -from .common import util as scu - - -def make_splunkhome_path(parts): - """ - create a path string by the several parts of the path - """ - - relpath = os.path.normpath(os.path.join(*parts)) - - basepath = os.environ["SPLUNK_HOME"] # Assume SPLUNK_HOME env has been set - - fullpath = os.path.normpath(os.path.join(basepath, relpath)) - - # Check that we haven't escaped from intended parent directories. - if os.path.relpath(fullpath, basepath)[0:2] == '..': - raise ValueError('Illegal escape from parent directory "%s": %s' % - (basepath, fullpath)) - - return fullpath - - -def get_splunk_bin(): - if os.name == "nt": - splunk_bin = "splunk.exe" - else: - splunk_bin = "splunk" - return make_splunkhome_path(("bin", splunk_bin)) - - -def get_appname_from_path(absolute_path): - return scu.get_appname_from_path(absolute_path) - - -def _get_merged_conf_raw(conf_name): - """ - :conf_name: configure file name - :return: raw output of all contents for the same conf file - Note: it depends on SPLUNK_HOME env variable - """ - - assert conf_name - - if conf_name.endswith(".conf"): - conf_name = conf_name[:-5] - - # FIXME dynamically caculate SPLUNK_HOME - btool_cli = [op.join(os.environ["SPLUNK_HOME"], "bin", "btool"), - conf_name, "list"] - - try: - p = subprocess.Popen(btool_cli, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - out, err = p.communicate() - except OSError: - raise - - return out - - -def _get_conf_stanzas(conf_name): - """ - :return: {stanza_name: stanza_configs}, dict of dict - """ - - res = _get_merged_conf_raw(conf_name) - res = StringIO(res) - parser = ConfigParser() - parser.optionxform = str - parser.readfp(res) - res = {} - for section in parser.sections(): - res[section] = {item[0]: item[1] for item in parser.items(section)} - return res - - -def get_splunkd_uri(): - if "SPLUNKD_URI" in os.environ: - return os.environ["SPLUNKD_URI"] - else: - server_conf = _get_conf_stanzas("server") - if server_conf["sslConfig"]["enableSplunkdSSL"].lower() == "true": - http = "https://" - else: - http = "http://" - - web_conf = _get_conf_stanzas("web") - host_port = web_conf["settings"]["mgmtHostPort"] - splunkd_uri = "{}{}".format(http, host_port) - - if os.environ.get("SPLUNK_BINDIP"): - bip = os.environ["SPLUNK_BINDIP"] - port_idx = bip.rfind(":") - if port_idx > 0: - bip = bip[:port_idx] - port = host_port[host_port.rfind(":"):] - splunkd_uri = "{}{}{}".format(http, bip, port) - return splunkd_uri diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/state_store.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/state_store.py deleted file mode 100755 index e4c3e5e0c4..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/state_store.py +++ /dev/null @@ -1,264 +0,0 @@ -import json -import os -import os.path as op -import time - -from ..splunktacollectorlib.common import log as stulog -from ..splunktalib import kv_client as kvc -from ..splunktalib.common import util - - -def get_state_store(meta_configs, - appname, - collection_name="talib_states", - use_kv_store=False, - use_cache_file=True, - max_cache_seconds=5): - # FIXME refactor this - if util.is_true(use_kv_store): - return StateStore(meta_configs, appname, collection_name) - if util.is_true(use_cache_file): - return CachedFileStateStore(meta_configs, appname, max_cache_seconds) - return FileStateStore(meta_configs, appname) - - -class BaseStateStore(object): - def __init__(self, meta_configs, appname): - self._meta_configs = meta_configs - self._appname = appname - - def update_state(self, key, states): - pass - - def get_state(self, key): - pass - - def delete_state(self, key): - pass - - def close(self, key=None): - pass - - -class StateStore(BaseStateStore): - - def __init__(self, meta_configs, appname, collection_name="talib_states"): - """ - :meta_configs: dict like and contains checkpoint_dir, session_key, - server_uri etc - :app_name: the name of the app - :collection_name: the collection name to be used. - Don"t use other method to visit the collection if you are using - StateStore to visit it. - """ - super(StateStore, self).__init__(meta_configs, appname) - - # State cache is a dict from _key to value - self._states_cache = {} - self._kv_client = None - self._collection = collection_name - self._kv_client = kvc.KVClient(meta_configs["server_uri"], - meta_configs["session_key"]) - kvc.create_collection(self._kv_client, self._collection, self._appname) - self._load_states_cache() - - def update_state(self, key, states): - """ - :state: Any JSON serializable - :return: None if successful, otherwise throws exception - """ - - if key not in self._states_cache: - self._kv_client.insert_collection_data( - self._collection, {"_key": key, "value": json.dumps(states)}, - self._appname) - else: - self._kv_client.update_collection_data( - self._collection, key, {"value": json.dumps(states)}, - self._appname) - self._states_cache[key] = states - - def get_state(self, key=None): - if key: - return self._states_cache.get(key, None) - return self._states_cache - - def delete_state(self, key=None): - if key: - self._delete_state(key) - else: - [self._delete_state(_key) for _key in self._states_cache.keys()] - - def _delete_state(self, key): - if key not in self._states_cache: - return - - self._kv_client.delete_collection_data( - self._collection, key, self._appname) - del self._states_cache[key] - - def _load_states_cache(self): - states = self._kv_client.get_collection_data( - self._collection, None, self._appname) - if not states: - return - - for state in states: - if "value" in state: - value = state["value"] - else: - value = state - - try: - value = json.loads(value) - except Exception: - pass - - self._states_cache[state["_key"]] = value - - -def _create_checkpoint_dir_if_needed(checkpoint_dir): - if os.path.isdir(checkpoint_dir): - return - - stulog.logger.info( - "Checkpoint dir '%s' doesn't exist, try to create it", - checkpoint_dir) - try: - os.mkdir(checkpoint_dir) - except OSError: - stulog.logger.exception( - "Failure creating checkpoint dir '%s'", checkpoint_dir - ) - raise Exception( - "Unable to create checkpoint dir '{}'".format(checkpoint_dir) - ) - - -class FileStateStore(BaseStateStore): - def __init__(self, meta_configs, appname): - """ - :meta_configs: dict like and contains checkpoint_dir, session_key, - server_uri etc - """ - - super(FileStateStore, self).__init__(meta_configs, appname) - - def update_state(self, key, states): - """ - :state: Any JSON serializable - :return: None if successful, otherwise throws exception - """ - - checkpoint_dir = self._meta_configs["checkpoint_dir"] - _create_checkpoint_dir_if_needed(checkpoint_dir) - - fname = op.join(checkpoint_dir, key) - with open(fname + ".new", "w") as jsonfile: - json.dump(states, jsonfile) - - if op.exists(fname): - os.remove(fname) - - os.rename(fname + ".new", fname) - # commented this to disable state cache for local file - # if key not in self._states_cache: - # self._states_cache[key] = {} - # self._states_cache[key] = states - - def get_state(self, key): - fname = op.join(self._meta_configs["checkpoint_dir"], key) - if op.exists(fname): - with open(fname) as jsonfile: - state = json.load(jsonfile) - # commented this to disable state cache for local file - # self._states_cache[key] = state - return state - else: - return None - - def delete_state(self, key): - fname = op.join(self._meta_configs["checkpoint_dir"], key) - if op.exists(fname): - os.remove(fname) - - -class CachedFileStateStore(BaseStateStore): - def __init__(self, meta_configs, appname, max_cache_seconds=5): - """ - :meta_configs: dict like and contains checkpoint_dir, session_key, - server_uri etc - """ - - super(CachedFileStateStore, self).__init__(meta_configs, appname) - self._states_cache = {} # item: time, dict - self._states_cache_lmd = {} #item: time, dict - self.max_cache_seconds = max_cache_seconds - - def update_state(self, key, states): - - now = time.time() - if key in self._states_cache: - last = self._states_cache_lmd[key][0] - if now - last >= self.max_cache_seconds: - self.update_state_flush(now, key, states) - else: - self.update_state_flush(now, key, states) - self._states_cache[key] = (now, states) - - def update_state_flush(self, now, key, states): - """ - :state: Any JSON serializable - :return: None if successful, otherwise throws exception - """ - self._states_cache_lmd[key] = (now, states) - checkpoint_dir = self._meta_configs["checkpoint_dir"] - - _create_checkpoint_dir_if_needed(checkpoint_dir) - - fname = op.join(checkpoint_dir, key) - - with open(fname + ".new", "w") as jsonfile: - json.dump(states, jsonfile) - - if op.exists(fname): - os.remove(fname) - - os.rename(fname + ".new", fname) - - def get_state(self, key): - if key in self._states_cache: - return self._states_cache[key][1] - - fname = op.join(self._meta_configs["checkpoint_dir"], key) - if op.exists(fname): - with open(fname) as jsonfile: - state = json.load(jsonfile) - now = time.time() - self._states_cache[key] = now, state - self._states_cache_lmd[key] = now, state - return state - else: - return None - - def delete_state(self, key): - fname = op.join(self._meta_configs["checkpoint_dir"], key) - if op.exists(fname): - os.remove(fname) - - if self._states_cache.get(key): - del self._states_cache[key] - if self._states_cache_lmd.get(key): - del self._states_cache_lmd[key] - - def close(self, key=None): - if not key: - for k, (t, s) in self._states_cache.iteritems(): - self.update_state_flush(t, k, s) - self._states_cache.clear() - self._states_cache_lmd.clear() - elif key in self._states_cache: - self.update_state_flush(self._states_cache[key][0], key, - self._states_cache[key][1]) - del self._states_cache[key] - del self._states_cache_lmd[key] diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer.py deleted file mode 100755 index 00a7224b0f..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer.py +++ /dev/null @@ -1,60 +0,0 @@ -import threading - - -class Timer(object): - """ - Timer wraps the callback and timestamp related stuff - """ - - _ident = 0 - _lock = threading.Lock() - - def __init__(self, callback, when, interval, ident=None): - self._callback = callback - self._when = when - self._interval = interval - - if ident is not None: - self._id = ident - else: - with Timer._lock: - self._id = Timer._ident + 1 - Timer._ident = Timer._ident + 1 - - def get_interval(self): - return self._interval - - def set_interval(self, interval): - self._interval = interval - - def get_expiration(self): - return self._when - - def set_initial_due_time(self, when): - self._when = when - - def update_expiration(self): - self._when += self._interval - - def __cmp__(self, other): - if other is None: - return 1 - - self_k = (self.get_expiration(), self.ident()) - other_k = (other.get_expiration(), other.ident()) - - if self_k == other_k: - return 0 - elif self_k < other_k: - return -1 - else: - return 1 - - def __eq__(self, other): - return isinstance(other, Timer) and (self.ident() == other.ident()) - - def __call__(self): - self._callback() - - def ident(self): - return self._id diff --git a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer_queue.py b/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer_queue.py deleted file mode 100755 index dd4d5f87a7..0000000000 --- a/package/bin/da_ess_contentupdate/cloudconnectlib/splunktalib/timer_queue.py +++ /dev/null @@ -1,138 +0,0 @@ -""" -A timer queue implementation -""" - -import threading -import Queue -from time import time -import traceback - -from .timer import Timer -from .common import log - - -class TimerQueue(object): - """ - A timer queue implementation, runs a separate thread to handle timers - """ - - import sortedcontainers as sc - - def __init__(self): - self._timers = TimerQueue.sc.SortedSet() - self._cancelling_timers = {} - self._lock = threading.Lock() - self._wakeup_queue = Queue.Queue() - self._thr = threading.Thread(target=self._check_and_execute) - self._started = False - - def start(self): - """ - Start the timer queue to make it start function - """ - - if self._started: - return - self._started = True - - self._thr.start() - log.logger.info("TimerQueue started.") - - def tear_down(self): - if not self._started: - return - self._started = True - self._wakeup(None) - self._thr.join() - - def add_timer(self, callback, when, interval): - """ - Add timer to the queue - """ - - timer = Timer(callback, when, interval) - with self._lock: - self._timers.add(timer) - self._wakeup() - return timer - - def remove_timer(self, timer): - """ - Remove timer from the queue. - """ - - with self._lock: - try: - self._timers.remove(timer) - except ValueError: - log.logger.info("Timer=%s is not in queue, move it to cancelling " - "list", timer.ident()) - else: - self._cancelling_timers[timer.ident()] = timer - - def _check_and_execute(self): - wakeup_queue = self._wakeup_queue - while 1: - (next_expired_time, expired_timers) = self._get_expired_timers() - for timer in expired_timers: - try: - timer() - except Exception: - log.logger.error(traceback.format_exc()) - - self._reset_timers(expired_timers) - - # Calc sleep time - if next_expired_time: - now = time() - if now < next_expired_time: - sleep_time = next_expired_time - now - else: - sleep_time = 0.1 - else: - sleep_time = 1 - - try: - wakeup = wakeup_queue.get(timeout=sleep_time) - if wakeup is None: - break - except Queue.Empty: - pass - log.logger.info("TimerQueue stopped.") - - def _get_expired_timers(self): - next_expired_time = 0 - now = time() - expired_timers = [] - with self._lock: - for timer in self._timers: - if timer.get_expiration() <= now: - expired_timers.append(timer) - - if expired_timers: - del self._timers[:len(expired_timers)] - - if self._timers: - next_expired_time = self._timers[0].get_expiration() - return (next_expired_time, expired_timers) - - def _reset_timers(self, expired_timers): - has_new_timer = False - with self._lock: - cancelling_timers = self._cancelling_timers - for timer in expired_timers: - if timer.ident() in cancelling_timers: - log.logger.INFO("Timer=%s has been cancelled", timer.ident()) - continue - elif timer.get_interval(): - # Repeated timer - timer.update_expiration() - self._timers.add(timer) - has_new_timer = True - cancelling_timers.clear() - - if has_new_timer: - self._wakeup() - - def _wakeup(self, something="not_None"): - self._wakeup_queue.put(something) diff --git a/package/bin/da_ess_contentupdate/decorator.py b/package/bin/da_ess_contentupdate/decorator.py deleted file mode 100755 index 43be279591..0000000000 --- a/package/bin/da_ess_contentupdate/decorator.py +++ /dev/null @@ -1,414 +0,0 @@ -# ######################### LICENSE ############################ # - -# Copyright (c) 2005-2017, Michele Simionato -# All rights reserved. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: - -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# Redistributions in bytecode form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. - -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. - -""" -Decorator module, see http://pypi.python.org/pypi/decorator -for the documentation. -""" -from __future__ import print_function - -import re -import sys -import inspect -import operator -import itertools -import collections - -__version__ = '4.0.11' - -if sys.version >= '3': - from inspect import getfullargspec - - def get_init(cls): - return cls.__init__ -else: - FullArgSpec = collections.namedtuple( - 'FullArgSpec', 'args varargs varkw defaults ' - 'kwonlyargs kwonlydefaults') - - def getfullargspec(f): - "A quick and dirty replacement for getfullargspec for Python 2.X" - return FullArgSpec._make(inspect.getargspec(f) + ([], None)) - - def get_init(cls): - return cls.__init__.__func__ - -# getargspec has been deprecated in Python 3.5 -ArgSpec = collections.namedtuple( - 'ArgSpec', 'args varargs varkw defaults') - - -def getargspec(f): - """A replacement for inspect.getargspec""" - spec = getfullargspec(f) - return ArgSpec(spec.args, spec.varargs, spec.varkw, spec.defaults) - - -DEF = re.compile(r'\s*def\s*([_\w][_\w\d]*)\s*\(') - - -# basic functionality -class FunctionMaker(object): - """ - An object with the ability to create functions with a given signature. - It has attributes name, doc, module, signature, defaults, dict and - methods update and make. - """ - - # Atomic get-and-increment provided by the GIL - _compile_count = itertools.count() - - # make pylint happy - args = varargs = varkw = defaults = kwonlyargs = kwonlydefaults = () - - def __init__(self, func=None, name=None, signature=None, - defaults=None, doc=None, module=None, funcdict=None): - self.shortsignature = signature - if func: - # func can be a class or a callable, but not an instance method - self.name = func.__name__ - if self.name == '': # small hack for lambda functions - self.name = '_lambda_' - self.doc = func.__doc__ - self.module = func.__module__ - if inspect.isfunction(func): - argspec = getfullargspec(func) - self.annotations = getattr(func, '__annotations__', {}) - for a in ('args', 'varargs', 'varkw', 'defaults', 'kwonlyargs', - 'kwonlydefaults'): - setattr(self, a, getattr(argspec, a)) - for i, arg in enumerate(self.args): - setattr(self, 'arg%d' % i, arg) - if sys.version < '3': # easy way - self.shortsignature = self.signature = ( - inspect.formatargspec( - formatvalue=lambda val: "", *argspec[:-2])[1:-1]) - else: # Python 3 way - allargs = list(self.args) - allshortargs = list(self.args) - if self.varargs: - allargs.append('*' + self.varargs) - allshortargs.append('*' + self.varargs) - elif self.kwonlyargs: - allargs.append('*') # single star syntax - for a in self.kwonlyargs: - allargs.append('%s=None' % a) - allshortargs.append('%s=%s' % (a, a)) - if self.varkw: - allargs.append('**' + self.varkw) - allshortargs.append('**' + self.varkw) - self.signature = ', '.join(allargs) - self.shortsignature = ', '.join(allshortargs) - self.dict = func.__dict__.copy() - # func=None happens when decorating a caller - if name: - self.name = name - if signature is not None: - self.signature = signature - if defaults: - self.defaults = defaults - if doc: - self.doc = doc - if module: - self.module = module - if funcdict: - self.dict = funcdict - # check existence required attributes - assert hasattr(self, 'name') - if not hasattr(self, 'signature'): - raise TypeError('You are decorating a non function: %s' % func) - - def update(self, func, **kw): - "Update the signature of func with the data in self" - func.__name__ = self.name - func.__doc__ = getattr(self, 'doc', None) - func.__dict__ = getattr(self, 'dict', {}) - func.__defaults__ = self.defaults - func.__kwdefaults__ = self.kwonlydefaults or None - func.__annotations__ = getattr(self, 'annotations', None) - try: - frame = sys._getframe(3) - except AttributeError: # for IronPython and similar implementations - callermodule = '?' - else: - callermodule = frame.f_globals.get('__name__', '?') - func.__module__ = getattr(self, 'module', callermodule) - func.__dict__.update(kw) - - def make(self, src_templ, evaldict=None, addsource=False, **attrs): - "Make a new function from a given template and update the signature" - src = src_templ % vars(self) # expand name and signature - evaldict = evaldict or {} - mo = DEF.match(src) - if mo is None: - raise SyntaxError('not a valid function template\n%s' % src) - name = mo.group(1) # extract the function name - names = set([name] + [arg.strip(' *') for arg in - self.shortsignature.split(',')]) - for n in names: - if n in ('_func_', '_call_'): - raise NameError('%s is overridden in\n%s' % (n, src)) - - if not src.endswith('\n'): # add a newline for old Pythons - src += '\n' - - # Ensure each generated function has a unique filename for profilers - # (such as cProfile) that depend on the tuple of (, - # , ) being unique. - filename = '' % (next(self._compile_count),) - try: - code = compile(src, filename, 'single') - exec(code, evaldict) - except: - print('Error in generated code:', file=sys.stderr) - print(src, file=sys.stderr) - raise - func = evaldict[name] - if addsource: - attrs['__source__'] = src - self.update(func, **attrs) - return func - - @classmethod - def create(cls, obj, body, evaldict, defaults=None, - doc=None, module=None, addsource=True, **attrs): - """ - Create a function from the strings name, signature and body. - evaldict is the evaluation dictionary. If addsource is true an - attribute __source__ is added to the result. The attributes attrs - are added, if any. - """ - if isinstance(obj, str): # "name(signature)" - name, rest = obj.strip().split('(', 1) - signature = rest[:-1] # strip a right parens - func = None - else: # a function - name = None - signature = None - func = obj - self = cls(func, name, signature, defaults, doc, module) - ibody = '\n'.join(' ' + line for line in body.splitlines()) - return self.make('def %(name)s(%(signature)s):\n' + ibody, - evaldict, addsource, **attrs) - - -def decorate(func, caller): - """ - decorate(func, caller) decorates a function using a caller. - """ - evaldict = dict(_call_=caller, _func_=func) - fun = FunctionMaker.create( - func, "return _call_(_func_, %(shortsignature)s)", - evaldict, __wrapped__=func) - if hasattr(func, '__qualname__'): - fun.__qualname__ = func.__qualname__ - return fun - - -def decorator(caller, _func=None): - """decorator(caller) converts a caller function into a decorator""" - if _func is not None: # return a decorated function - # this is obsolete behavior; you should use decorate instead - return decorate(_func, caller) - # else return a decorator function - if inspect.isclass(caller): - name = caller.__name__.lower() - doc = 'decorator(%s) converts functions/generators into ' \ - 'factories of %s objects' % (caller.__name__, caller.__name__) - elif inspect.isfunction(caller): - if caller.__name__ == '': - name = '_lambda_' - else: - name = caller.__name__ - doc = caller.__doc__ - else: # assume caller is an object with a __call__ method - name = caller.__class__.__name__.lower() - doc = caller.__call__.__doc__ - evaldict = dict(_call_=caller, _decorate_=decorate) - return FunctionMaker.create( - '%s(func)' % name, 'return _decorate_(func, _call_)', - evaldict, doc=doc, module=caller.__module__, - __wrapped__=caller) - - -# ####################### contextmanager ####################### # - -try: # Python >= 3.2 - from contextlib import _GeneratorContextManager -except ImportError: # Python >= 2.5 - from contextlib import GeneratorContextManager as _GeneratorContextManager - - -class ContextManager(_GeneratorContextManager): - def __call__(self, func): - """Context manager decorator""" - return FunctionMaker.create( - func, "with _self_: return _func_(%(shortsignature)s)", - dict(_self_=self, _func_=func), __wrapped__=func) - - -init = getfullargspec(_GeneratorContextManager.__init__) -n_args = len(init.args) -if n_args == 2 and not init.varargs: # (self, genobj) Python 2.7 - def __init__(self, g, *a, **k): - return _GeneratorContextManager.__init__(self, g(*a, **k)) - ContextManager.__init__ = __init__ -elif n_args == 2 and init.varargs: # (self, gen, *a, **k) Python 3.4 - pass -elif n_args == 4: # (self, gen, args, kwds) Python 3.5 - def __init__(self, g, *a, **k): - return _GeneratorContextManager.__init__(self, g, a, k) - ContextManager.__init__ = __init__ - -contextmanager = decorator(ContextManager) - - -# ############################ dispatch_on ############################ # - -def append(a, vancestors): - """ - Append ``a`` to the list of the virtual ancestors, unless it is already - included. - """ - add = True - for j, va in enumerate(vancestors): - if issubclass(va, a): - add = False - break - if issubclass(a, va): - vancestors[j] = a - add = False - if add: - vancestors.append(a) - - -# inspired from simplegeneric by P.J. Eby and functools.singledispatch -def dispatch_on(*dispatch_args): - """ - Factory of decorators turning a function into a generic function - dispatching on the given arguments. - """ - assert dispatch_args, 'No dispatch args passed' - dispatch_str = '(%s,)' % ', '.join(dispatch_args) - - def check(arguments, wrong=operator.ne, msg=''): - """Make sure one passes the expected number of arguments""" - if wrong(len(arguments), len(dispatch_args)): - raise TypeError('Expected %d arguments, got %d%s' % - (len(dispatch_args), len(arguments), msg)) - - def gen_func_dec(func): - """Decorator turning a function into a generic function""" - - # first check the dispatch arguments - argset = set(getfullargspec(func).args) - if not set(dispatch_args) <= argset: - raise NameError('Unknown dispatch arguments %s' % dispatch_str) - - typemap = {} - - def vancestors(*types): - """ - Get a list of sets of virtual ancestors for the given types - """ - check(types) - ras = [[] for _ in range(len(dispatch_args))] - for types_ in typemap: - for t, type_, ra in zip(types, types_, ras): - if issubclass(t, type_) and type_ not in t.mro(): - append(type_, ra) - return [set(ra) for ra in ras] - - def ancestors(*types): - """ - Get a list of virtual MROs, one for each type - """ - check(types) - lists = [] - for t, vas in zip(types, vancestors(*types)): - n_vas = len(vas) - if n_vas > 1: - raise RuntimeError( - 'Ambiguous dispatch for %s: %s' % (t, vas)) - elif n_vas == 1: - va, = vas - mro = type('t', (t, va), {}).mro()[1:] - else: - mro = t.mro() - lists.append(mro[:-1]) # discard t and object - return lists - - def register(*types): - """ - Decorator to register an implementation for the given types - """ - check(types) - - def dec(f): - check(getfullargspec(f).args, operator.lt, ' in ' + f.__name__) - typemap[types] = f - return f - return dec - - def dispatch_info(*types): - """ - An utility to introspect the dispatch algorithm - """ - check(types) - lst = [] - for anc in itertools.product(*ancestors(*types)): - lst.append(tuple(a.__name__ for a in anc)) - return lst - - def _dispatch(dispatch_args, *args, **kw): - types = tuple(type(arg) for arg in dispatch_args) - try: # fast path - f = typemap[types] - except KeyError: - pass - else: - return f(*args, **kw) - combinations = itertools.product(*ancestors(*types)) - next(combinations) # the first one has been already tried - for types_ in combinations: - f = typemap.get(types_) - if f is not None: - return f(*args, **kw) - - # else call the default implementation - return func(*args, **kw) - - return FunctionMaker.create( - func, 'return _f_(%s, %%(shortsignature)s)' % dispatch_str, - dict(_f_=_dispatch), register=register, default=func, - typemap=typemap, vancestors=vancestors, ancestors=ancestors, - dispatch_info=dispatch_info, __wrapped__=func) - - gen_func_dec.__name__ = 'dispatch_on' + dispatch_str - return gen_func_dec diff --git a/package/bin/da_ess_contentupdate/functools32/__init__.py b/package/bin/da_ess_contentupdate/functools32/__init__.py deleted file mode 100755 index 837f7fb651..0000000000 --- a/package/bin/da_ess_contentupdate/functools32/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .functools32 import * diff --git a/package/bin/da_ess_contentupdate/functools32/_dummy_thread32.py b/package/bin/da_ess_contentupdate/functools32/_dummy_thread32.py deleted file mode 100755 index 8503b0e3dd..0000000000 --- a/package/bin/da_ess_contentupdate/functools32/_dummy_thread32.py +++ /dev/null @@ -1,158 +0,0 @@ -"""Drop-in replacement for the thread module. - -Meant to be used as a brain-dead substitute so that threaded code does -not need to be rewritten for when the thread module is not present. - -Suggested usage is:: - - try: - try: - import _thread # Python >= 3 - except: - import thread as _thread # Python < 3 - except ImportError: - import _dummy_thread as _thread - -""" -# Exports only things specified by thread documentation; -# skipping obsolete synonyms allocate(), start_new(), exit_thread(). -__all__ = ['error', 'start_new_thread', 'exit', 'get_ident', 'allocate_lock', - 'interrupt_main', 'LockType'] - -# A dummy value -TIMEOUT_MAX = 2**31 - -# NOTE: this module can be imported early in the extension building process, -# and so top level imports of other modules should be avoided. Instead, all -# imports are done when needed on a function-by-function basis. Since threads -# are disabled, the import lock should not be an issue anyway (??). - -class error(Exception): - """Dummy implementation of _thread.error.""" - - def __init__(self, *args): - self.args = args - -def start_new_thread(function, args, kwargs={}): - """Dummy implementation of _thread.start_new_thread(). - - Compatibility is maintained by making sure that ``args`` is a - tuple and ``kwargs`` is a dictionary. If an exception is raised - and it is SystemExit (which can be done by _thread.exit()) it is - caught and nothing is done; all other exceptions are printed out - by using traceback.print_exc(). - - If the executed function calls interrupt_main the KeyboardInterrupt will be - raised when the function returns. - - """ - if type(args) != type(tuple()): - raise TypeError("2nd arg must be a tuple") - if type(kwargs) != type(dict()): - raise TypeError("3rd arg must be a dict") - global _main - _main = False - try: - function(*args, **kwargs) - except SystemExit: - pass - except: - import traceback - traceback.print_exc() - _main = True - global _interrupt - if _interrupt: - _interrupt = False - raise KeyboardInterrupt - -def exit(): - """Dummy implementation of _thread.exit().""" - raise SystemExit - -def get_ident(): - """Dummy implementation of _thread.get_ident(). - - Since this module should only be used when _threadmodule is not - available, it is safe to assume that the current process is the - only thread. Thus a constant can be safely returned. - """ - return -1 - -def allocate_lock(): - """Dummy implementation of _thread.allocate_lock().""" - return LockType() - -def stack_size(size=None): - """Dummy implementation of _thread.stack_size().""" - if size is not None: - raise error("setting thread stack size not supported") - return 0 - -class LockType(object): - """Class implementing dummy implementation of _thread.LockType. - - Compatibility is maintained by maintaining self.locked_status - which is a boolean that stores the state of the lock. Pickling of - the lock, though, should not be done since if the _thread module is - then used with an unpickled ``lock()`` from here problems could - occur from this class not having atomic methods. - - """ - - def __init__(self): - self.locked_status = False - - def acquire(self, waitflag=None, timeout=-1): - """Dummy implementation of acquire(). - - For blocking calls, self.locked_status is automatically set to - True and returned appropriately based on value of - ``waitflag``. If it is non-blocking, then the value is - actually checked and not set if it is already acquired. This - is all done so that threading.Condition's assert statements - aren't triggered and throw a little fit. - - """ - if waitflag is None or waitflag: - self.locked_status = True - return True - else: - if not self.locked_status: - self.locked_status = True - return True - else: - if timeout > 0: - import time - time.sleep(timeout) - return False - - __enter__ = acquire - - def __exit__(self, typ, val, tb): - self.release() - - def release(self): - """Release the dummy lock.""" - # XXX Perhaps shouldn't actually bother to test? Could lead - # to problems for complex, threaded code. - if not self.locked_status: - raise error - self.locked_status = False - return True - - def locked(self): - return self.locked_status - -# Used to signal that interrupt_main was called in a "thread" -_interrupt = False -# True when not executing in a "thread" -_main = True - -def interrupt_main(): - """Set _interrupt flag to True to have start_new_thread raise - KeyboardInterrupt upon exiting.""" - if _main: - raise KeyboardInterrupt - else: - global _interrupt - _interrupt = True diff --git a/package/bin/da_ess_contentupdate/functools32/functools32.py b/package/bin/da_ess_contentupdate/functools32/functools32.py deleted file mode 100755 index c44551fac0..0000000000 --- a/package/bin/da_ess_contentupdate/functools32/functools32.py +++ /dev/null @@ -1,423 +0,0 @@ -"""functools.py - Tools for working with functions and callable objects -""" -# Python module wrapper for _functools C module -# to allow utilities written in Python to be added -# to the functools module. -# Written by Nick Coghlan -# and Raymond Hettinger -# Copyright (C) 2006-2010 Python Software Foundation. -# See C source code for _functools credits/copyright - -__all__ = ['update_wrapper', 'wraps', 'WRAPPER_ASSIGNMENTS', 'WRAPPER_UPDATES', - 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial'] - -from _functools import partial, reduce -from collections import MutableMapping, namedtuple -from .reprlib32 import recursive_repr as _recursive_repr -from weakref import proxy as _proxy -import sys as _sys -try: - from thread import allocate_lock as Lock -except ImportError: - from ._dummy_thread32 import allocate_lock as Lock - -################################################################################ -### OrderedDict -################################################################################ - -class _Link(object): - __slots__ = 'prev', 'next', 'key', '__weakref__' - -class OrderedDict(dict): - 'Dictionary that remembers insertion order' - # An inherited dict maps keys to values. - # The inherited dict provides __getitem__, __len__, __contains__, and get. - # The remaining methods are order-aware. - # Big-O running times for all methods are the same as regular dictionaries. - - # The internal self.__map dict maps keys to links in a doubly linked list. - # The circular doubly linked list starts and ends with a sentinel element. - # The sentinel element never gets deleted (this simplifies the algorithm). - # The sentinel is in self.__hardroot with a weakref proxy in self.__root. - # The prev links are weakref proxies (to prevent circular references). - # Individual links are kept alive by the hard reference in self.__map. - # Those hard references disappear when a key is deleted from an OrderedDict. - - def __init__(self, *args, **kwds): - '''Initialize an ordered dictionary. The signature is the same as - regular dictionaries, but keyword arguments are not recommended because - their insertion order is arbitrary. - - ''' - if len(args) > 1: - raise TypeError('expected at most 1 arguments, got %d' % len(args)) - try: - self.__root - except AttributeError: - self.__hardroot = _Link() - self.__root = root = _proxy(self.__hardroot) - root.prev = root.next = root - self.__map = {} - self.__update(*args, **kwds) - - def __setitem__(self, key, value, - dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link): - 'od.__setitem__(i, y) <==> od[i]=y' - # Setting a new item creates a new link at the end of the linked list, - # and the inherited dictionary is updated with the new key/value pair. - if key not in self: - self.__map[key] = link = Link() - root = self.__root - last = root.prev - link.prev, link.next, link.key = last, root, key - last.next = link - root.prev = proxy(link) - dict_setitem(self, key, value) - - def __delitem__(self, key, dict_delitem=dict.__delitem__): - 'od.__delitem__(y) <==> del od[y]' - # Deleting an existing item uses self.__map to find the link which gets - # removed by updating the links in the predecessor and successor nodes. - dict_delitem(self, key) - link = self.__map.pop(key) - link_prev = link.prev - link_next = link.next - link_prev.next = link_next - link_next.prev = link_prev - - def __iter__(self): - 'od.__iter__() <==> iter(od)' - # Traverse the linked list in order. - root = self.__root - curr = root.next - while curr is not root: - yield curr.key - curr = curr.next - - def __reversed__(self): - 'od.__reversed__() <==> reversed(od)' - # Traverse the linked list in reverse order. - root = self.__root - curr = root.prev - while curr is not root: - yield curr.key - curr = curr.prev - - def clear(self): - 'od.clear() -> None. Remove all items from od.' - root = self.__root - root.prev = root.next = root - self.__map.clear() - dict.clear(self) - - def popitem(self, last=True): - '''od.popitem() -> (k, v), return and remove a (key, value) pair. - Pairs are returned in LIFO order if last is true or FIFO order if false. - - ''' - if not self: - raise KeyError('dictionary is empty') - root = self.__root - if last: - link = root.prev - link_prev = link.prev - link_prev.next = root - root.prev = link_prev - else: - link = root.next - link_next = link.next - root.next = link_next - link_next.prev = root - key = link.key - del self.__map[key] - value = dict.pop(self, key) - return key, value - - def move_to_end(self, key, last=True): - '''Move an existing element to the end (or beginning if last==False). - - Raises KeyError if the element does not exist. - When last=True, acts like a fast version of self[key]=self.pop(key). - - ''' - link = self.__map[key] - link_prev = link.prev - link_next = link.next - link_prev.next = link_next - link_next.prev = link_prev - root = self.__root - if last: - last = root.prev - link.prev = last - link.next = root - last.next = root.prev = link - else: - first = root.next - link.prev = root - link.next = first - root.next = first.prev = link - - def __sizeof__(self): - sizeof = _sys.getsizeof - n = len(self) + 1 # number of links including root - size = sizeof(self.__dict__) # instance dictionary - size += sizeof(self.__map) * 2 # internal dict and inherited dict - size += sizeof(self.__hardroot) * n # link objects - size += sizeof(self.__root) * n # proxy objects - return size - - update = __update = MutableMapping.update - keys = MutableMapping.keys - values = MutableMapping.values - items = MutableMapping.items - __ne__ = MutableMapping.__ne__ - - __marker = object() - - def pop(self, key, default=__marker): - '''od.pop(k[,d]) -> v, remove specified key and return the corresponding - value. If key is not found, d is returned if given, otherwise KeyError - is raised. - - ''' - if key in self: - result = self[key] - del self[key] - return result - if default is self.__marker: - raise KeyError(key) - return default - - def setdefault(self, key, default=None): - 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' - if key in self: - return self[key] - self[key] = default - return default - - @_recursive_repr() - def __repr__(self): - 'od.__repr__() <==> repr(od)' - if not self: - return '%s()' % (self.__class__.__name__,) - return '%s(%r)' % (self.__class__.__name__, list(self.items())) - - def __reduce__(self): - 'Return state information for pickling' - items = [[k, self[k]] for k in self] - inst_dict = vars(self).copy() - for k in vars(OrderedDict()): - inst_dict.pop(k, None) - if inst_dict: - return (self.__class__, (items,), inst_dict) - return self.__class__, (items,) - - def copy(self): - 'od.copy() -> a shallow copy of od' - return self.__class__(self) - - @classmethod - def fromkeys(cls, iterable, value=None): - '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S. - If not specified, the value defaults to None. - - ''' - self = cls() - for key in iterable: - self[key] = value - return self - - def __eq__(self, other): - '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive - while comparison to a regular mapping is order-insensitive. - - ''' - if isinstance(other, OrderedDict): - return len(self)==len(other) and \ - all(p==q for p, q in zip(self.items(), other.items())) - return dict.__eq__(self, other) - -# update_wrapper() and wraps() are tools to help write -# wrapper functions that can handle naive introspection - -WRAPPER_ASSIGNMENTS = ('__module__', '__name__', '__doc__') -WRAPPER_UPDATES = ('__dict__',) -def update_wrapper(wrapper, - wrapped, - assigned = WRAPPER_ASSIGNMENTS, - updated = WRAPPER_UPDATES): - """Update a wrapper function to look like the wrapped function - - wrapper is the function to be updated - wrapped is the original function - assigned is a tuple naming the attributes assigned directly - from the wrapped function to the wrapper function (defaults to - functools.WRAPPER_ASSIGNMENTS) - updated is a tuple naming the attributes of the wrapper that - are updated with the corresponding attribute from the wrapped - function (defaults to functools.WRAPPER_UPDATES) - """ - wrapper.__wrapped__ = wrapped - for attr in assigned: - try: - value = getattr(wrapped, attr) - except AttributeError: - pass - else: - setattr(wrapper, attr, value) - for attr in updated: - getattr(wrapper, attr).update(getattr(wrapped, attr, {})) - # Return the wrapper so this can be used as a decorator via partial() - return wrapper - -def wraps(wrapped, - assigned = WRAPPER_ASSIGNMENTS, - updated = WRAPPER_UPDATES): - """Decorator factory to apply update_wrapper() to a wrapper function - - Returns a decorator that invokes update_wrapper() with the decorated - function as the wrapper argument and the arguments to wraps() as the - remaining arguments. Default arguments are as for update_wrapper(). - This is a convenience function to simplify applying partial() to - update_wrapper(). - """ - return partial(update_wrapper, wrapped=wrapped, - assigned=assigned, updated=updated) - -def total_ordering(cls): - """Class decorator that fills in missing ordering methods""" - convert = { - '__lt__': [('__gt__', lambda self, other: not (self < other or self == other)), - ('__le__', lambda self, other: self < other or self == other), - ('__ge__', lambda self, other: not self < other)], - '__le__': [('__ge__', lambda self, other: not self <= other or self == other), - ('__lt__', lambda self, other: self <= other and not self == other), - ('__gt__', lambda self, other: not self <= other)], - '__gt__': [('__lt__', lambda self, other: not (self > other or self == other)), - ('__ge__', lambda self, other: self > other or self == other), - ('__le__', lambda self, other: not self > other)], - '__ge__': [('__le__', lambda self, other: (not self >= other) or self == other), - ('__gt__', lambda self, other: self >= other and not self == other), - ('__lt__', lambda self, other: not self >= other)] - } - roots = set(dir(cls)) & set(convert) - if not roots: - raise ValueError('must define at least one ordering operation: < > <= >=') - root = max(roots) # prefer __lt__ to __le__ to __gt__ to __ge__ - for opname, opfunc in convert[root]: - if opname not in roots: - opfunc.__name__ = opname - opfunc.__doc__ = getattr(int, opname).__doc__ - setattr(cls, opname, opfunc) - return cls - -def cmp_to_key(mycmp): - """Convert a cmp= function into a key= function""" - class K(object): - __slots__ = ['obj'] - def __init__(self, obj): - self.obj = obj - def __lt__(self, other): - return mycmp(self.obj, other.obj) < 0 - def __gt__(self, other): - return mycmp(self.obj, other.obj) > 0 - def __eq__(self, other): - return mycmp(self.obj, other.obj) == 0 - def __le__(self, other): - return mycmp(self.obj, other.obj) <= 0 - def __ge__(self, other): - return mycmp(self.obj, other.obj) >= 0 - def __ne__(self, other): - return mycmp(self.obj, other.obj) != 0 - __hash__ = None - return K - -_CacheInfo = namedtuple("CacheInfo", "hits misses maxsize currsize") - -def lru_cache(maxsize=100): - """Least-recently-used cache decorator. - - If *maxsize* is set to None, the LRU features are disabled and the cache - can grow without bound. - - Arguments to the cached function must be hashable. - - View the cache statistics named tuple (hits, misses, maxsize, currsize) with - f.cache_info(). Clear the cache and statistics with f.cache_clear(). - Access the underlying function with f.__wrapped__. - - See: http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used - - """ - # Users should only access the lru_cache through its public API: - # cache_info, cache_clear, and f.__wrapped__ - # The internals of the lru_cache are encapsulated for thread safety and - # to allow the implementation to change (including a possible C version). - - def decorating_function(user_function, - tuple=tuple, sorted=sorted, len=len, KeyError=KeyError): - - hits, misses = [0], [0] - kwd_mark = (object(),) # separates positional and keyword args - lock = Lock() # needed because OrderedDict isn't threadsafe - - if maxsize is None: - cache = dict() # simple cache without ordering or size limit - - @wraps(user_function) - def wrapper(*args, **kwds): - key = args - if kwds: - key += kwd_mark + tuple(sorted(kwds.items())) - try: - result = cache[key] - hits[0] += 1 - return result - except KeyError: - pass - result = user_function(*args, **kwds) - cache[key] = result - misses[0] += 1 - return result - else: - cache = OrderedDict() # ordered least recent to most recent - cache_popitem = cache.popitem - cache_renew = cache.move_to_end - - @wraps(user_function) - def wrapper(*args, **kwds): - key = args - if kwds: - key += kwd_mark + tuple(sorted(kwds.items())) - with lock: - try: - result = cache[key] - cache_renew(key) # record recent use of this key - hits[0] += 1 - return result - except KeyError: - pass - result = user_function(*args, **kwds) - with lock: - cache[key] = result # record recent use of this key - misses[0] += 1 - if len(cache) > maxsize: - cache_popitem(0) # purge least recently used cache entry - return result - - def cache_info(): - """Report cache statistics""" - with lock: - return _CacheInfo(hits[0], misses[0], maxsize, len(cache)) - - def cache_clear(): - """Clear the cache and cache statistics""" - with lock: - cache.clear() - hits[0] = misses[0] = 0 - - wrapper.cache_info = cache_info - wrapper.cache_clear = cache_clear - return wrapper - - return decorating_function diff --git a/package/bin/da_ess_contentupdate/functools32/reprlib32.py b/package/bin/da_ess_contentupdate/functools32/reprlib32.py deleted file mode 100755 index af919758ca..0000000000 --- a/package/bin/da_ess_contentupdate/functools32/reprlib32.py +++ /dev/null @@ -1,157 +0,0 @@ -"""Redo the builtin repr() (representation) but with limits on most sizes.""" - -__all__ = ["Repr", "repr", "recursive_repr"] - -import __builtin__ as builtins -from itertools import islice -try: - from thread import get_ident -except ImportError: - from _dummy_thread32 import get_ident - -def recursive_repr(fillvalue='...'): - 'Decorator to make a repr function return fillvalue for a recursive call' - - def decorating_function(user_function): - repr_running = set() - - def wrapper(self): - key = id(self), get_ident() - if key in repr_running: - return fillvalue - repr_running.add(key) - try: - result = user_function(self) - finally: - repr_running.discard(key) - return result - - # Can't use functools.wraps() here because of bootstrap issues - wrapper.__module__ = getattr(user_function, '__module__') - wrapper.__doc__ = getattr(user_function, '__doc__') - wrapper.__name__ = getattr(user_function, '__name__') - wrapper.__annotations__ = getattr(user_function, '__annotations__', {}) - return wrapper - - return decorating_function - -class Repr: - - def __init__(self): - self.maxlevel = 6 - self.maxtuple = 6 - self.maxlist = 6 - self.maxarray = 5 - self.maxdict = 4 - self.maxset = 6 - self.maxfrozenset = 6 - self.maxdeque = 6 - self.maxstring = 30 - self.maxlong = 40 - self.maxother = 30 - - def repr(self, x): - return self.repr1(x, self.maxlevel) - - def repr1(self, x, level): - typename = type(x).__name__ - if ' ' in typename: - parts = typename.split() - typename = '_'.join(parts) - if hasattr(self, 'repr_' + typename): - return getattr(self, 'repr_' + typename)(x, level) - else: - return self.repr_instance(x, level) - - def _repr_iterable(self, x, level, left, right, maxiter, trail=''): - n = len(x) - if level <= 0 and n: - s = '...' - else: - newlevel = level - 1 - repr1 = self.repr1 - pieces = [repr1(elem, newlevel) for elem in islice(x, maxiter)] - if n > maxiter: pieces.append('...') - s = ', '.join(pieces) - if n == 1 and trail: right = trail + right - return '%s%s%s' % (left, s, right) - - def repr_tuple(self, x, level): - return self._repr_iterable(x, level, '(', ')', self.maxtuple, ',') - - def repr_list(self, x, level): - return self._repr_iterable(x, level, '[', ']', self.maxlist) - - def repr_array(self, x, level): - header = "array('%s', [" % x.typecode - return self._repr_iterable(x, level, header, '])', self.maxarray) - - def repr_set(self, x, level): - x = _possibly_sorted(x) - return self._repr_iterable(x, level, 'set([', '])', self.maxset) - - def repr_frozenset(self, x, level): - x = _possibly_sorted(x) - return self._repr_iterable(x, level, 'frozenset([', '])', - self.maxfrozenset) - - def repr_deque(self, x, level): - return self._repr_iterable(x, level, 'deque([', '])', self.maxdeque) - - def repr_dict(self, x, level): - n = len(x) - if n == 0: return '{}' - if level <= 0: return '{...}' - newlevel = level - 1 - repr1 = self.repr1 - pieces = [] - for key in islice(_possibly_sorted(x), self.maxdict): - keyrepr = repr1(key, newlevel) - valrepr = repr1(x[key], newlevel) - pieces.append('%s: %s' % (keyrepr, valrepr)) - if n > self.maxdict: pieces.append('...') - s = ', '.join(pieces) - return '{%s}' % (s,) - - def repr_str(self, x, level): - s = builtins.repr(x[:self.maxstring]) - if len(s) > self.maxstring: - i = max(0, (self.maxstring-3)//2) - j = max(0, self.maxstring-3-i) - s = builtins.repr(x[:i] + x[len(x)-j:]) - s = s[:i] + '...' + s[len(s)-j:] - return s - - def repr_int(self, x, level): - s = builtins.repr(x) # XXX Hope this isn't too slow... - if len(s) > self.maxlong: - i = max(0, (self.maxlong-3)//2) - j = max(0, self.maxlong-3-i) - s = s[:i] + '...' + s[len(s)-j:] - return s - - def repr_instance(self, x, level): - try: - s = builtins.repr(x) - # Bugs in x.__repr__() can cause arbitrary - # exceptions -- then make up something - except Exception: - return '<%s instance at %x>' % (x.__class__.__name__, id(x)) - if len(s) > self.maxother: - i = max(0, (self.maxother-3)//2) - j = max(0, self.maxother-3-i) - s = s[:i] + '...' + s[len(s)-j:] - return s - - -def _possibly_sorted(x): - # Since not all sequences of items can be sorted and comparison - # functions may raise arbitrary exceptions, return an unsorted - # sequence in that case. - try: - return sorted(x) - except Exception: - return list(x) - -aRepr = Repr() -repr = aRepr.repr diff --git a/package/bin/da_ess_contentupdate/httplib2/__init__.py b/package/bin/da_ess_contentupdate/httplib2/__init__.py deleted file mode 100755 index 6fa3cc60e5..0000000000 --- a/package/bin/da_ess_contentupdate/httplib2/__init__.py +++ /dev/null @@ -1,1696 +0,0 @@ -from __future__ import generators -""" -httplib2 - -A caching http interface that supports ETags and gzip -to conserve bandwidth. - -Requires Python 2.3 or later - -Changelog: -2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. - -""" - -__author__ = "Joe Gregorio (joe@bitworking.org)" -__copyright__ = "Copyright 2006, Joe Gregorio" -__contributors__ = ["Thomas Broyer (t.broyer@ltgt.net)", - "James Antill", - "Xavier Verges Farrero", - "Jonathan Feinberg", - "Blair Zajac", - "Sam Ruby", - "Louis Nyffenegger"] -__license__ = "MIT" -__version__ = "0.9.2" - -import re -import sys -import email -import email.Utils -import email.Message -import email.FeedParser -import StringIO -import gzip -import zlib -import httplib -import urlparse -import urllib -import base64 -import os -import copy -import calendar -import time -import random -import errno -try: - from hashlib import sha1 as _sha, md5 as _md5 -except ImportError: - # prior to Python 2.5, these were separate modules - import sha - import md5 - _sha = sha.new - _md5 = md5.new -import hmac -from gettext import gettext as _ -import socket - -try: - from httplib2 import socks -except ImportError: - try: - import socks - except (ImportError, AttributeError): - socks = None - -# Build the appropriate socket wrapper for ssl -try: - import ssl # python 2.6 - ssl_SSLError = ssl.SSLError - def _ssl_wrap_socket(sock, key_file, cert_file, - disable_validation, ca_certs): - if disable_validation: - cert_reqs = ssl.CERT_NONE - else: - cert_reqs = ssl.CERT_REQUIRED - # We should be specifying SSL version 3 or TLS v1, but the ssl module - # doesn't expose the necessary knobs. So we need to go with the default - # of SSLv23. - return ssl.wrap_socket(sock, keyfile=key_file, certfile=cert_file, - cert_reqs=cert_reqs, ca_certs=ca_certs) -except (AttributeError, ImportError): - ssl_SSLError = None - def _ssl_wrap_socket(sock, key_file, cert_file, - disable_validation, ca_certs): - if not disable_validation: - raise CertificateValidationUnsupported( - "SSL certificate validation is not supported without " - "the ssl module installed. To avoid this error, install " - "the ssl module, or explicity disable validation.") - ssl_sock = socket.ssl(sock, key_file, cert_file) - return httplib.FakeSocket(sock, ssl_sock) - - -if sys.version_info >= (2,3): - from iri2uri import iri2uri -else: - def iri2uri(uri): - return uri - -def has_timeout(timeout): # python 2.6 - if hasattr(socket, '_GLOBAL_DEFAULT_TIMEOUT'): - return (timeout is not None and timeout is not socket._GLOBAL_DEFAULT_TIMEOUT) - return (timeout is not None) - -__all__ = [ - 'Http', 'Response', 'ProxyInfo', 'HttpLib2Error', 'RedirectMissingLocation', - 'RedirectLimit', 'FailedToDecompressContent', - 'UnimplementedDigestAuthOptionError', - 'UnimplementedHmacDigestAuthOptionError', - 'debuglevel', 'ProxiesUnavailableError'] - - -# The httplib debug level, set to a non-zero value to get debug output -debuglevel = 0 - -# A request will be tried 'RETRIES' times if it fails at the socket/connection level. -RETRIES = 2 - -# Python 2.3 support -if sys.version_info < (2,4): - def sorted(seq): - seq.sort() - return seq - -# Python 2.3 support -def HTTPResponse__getheaders(self): - """Return list of (header, value) tuples.""" - if self.msg is None: - raise httplib.ResponseNotReady() - return self.msg.items() - -if not hasattr(httplib.HTTPResponse, 'getheaders'): - httplib.HTTPResponse.getheaders = HTTPResponse__getheaders - -# All exceptions raised here derive from HttpLib2Error -class HttpLib2Error(Exception): pass - -# Some exceptions can be caught and optionally -# be turned back into responses. -class HttpLib2ErrorWithResponse(HttpLib2Error): - def __init__(self, desc, response, content): - self.response = response - self.content = content - HttpLib2Error.__init__(self, desc) - -class RedirectMissingLocation(HttpLib2ErrorWithResponse): pass -class RedirectLimit(HttpLib2ErrorWithResponse): pass -class FailedToDecompressContent(HttpLib2ErrorWithResponse): pass -class UnimplementedDigestAuthOptionError(HttpLib2ErrorWithResponse): pass -class UnimplementedHmacDigestAuthOptionError(HttpLib2ErrorWithResponse): pass - -class MalformedHeader(HttpLib2Error): pass -class RelativeURIError(HttpLib2Error): pass -class ServerNotFoundError(HttpLib2Error): pass -class ProxiesUnavailableError(HttpLib2Error): pass -class CertificateValidationUnsupported(HttpLib2Error): pass -class SSLHandshakeError(HttpLib2Error): pass -class NotSupportedOnThisPlatform(HttpLib2Error): pass -class CertificateHostnameMismatch(SSLHandshakeError): - def __init__(self, desc, host, cert): - HttpLib2Error.__init__(self, desc) - self.host = host - self.cert = cert - -# Open Items: -# ----------- -# Proxy support - -# Are we removing the cached content too soon on PUT (only delete on 200 Maybe?) - -# Pluggable cache storage (supports storing the cache in -# flat files by default. We need a plug-in architecture -# that can support Berkeley DB and Squid) - -# == Known Issues == -# Does not handle a resource that uses conneg and Last-Modified but no ETag as a cache validator. -# Does not handle Cache-Control: max-stale -# Does not use Age: headers when calculating cache freshness. - - -# The number of redirections to follow before giving up. -# Note that only GET redirects are automatically followed. -# Will also honor 301 requests by saving that info and never -# requesting that URI again. -DEFAULT_MAX_REDIRECTS = 5 - -try: - # Users can optionally provide a module that tells us where the CA_CERTS - # are located. - import ca_certs_locater - CA_CERTS = ca_certs_locater.get() -except ImportError: - # Default CA certificates file bundled with httplib2. - CA_CERTS = os.path.join( - os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") - -# Which headers are hop-by-hop headers by default -HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] - -def _get_end2end_headers(response): - hopbyhop = list(HOP_BY_HOP) - hopbyhop.extend([x.strip() for x in response.get('connection', '').split(',')]) - return [header for header in response.keys() if header not in hopbyhop] - -URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?") - -def parse_uri(uri): - """Parses a URI using the regex given in Appendix B of RFC 3986. - - (scheme, authority, path, query, fragment) = parse_uri(uri) - """ - groups = URI.match(uri).groups() - return (groups[1], groups[3], groups[4], groups[6], groups[8]) - -def urlnorm(uri): - (scheme, authority, path, query, fragment) = parse_uri(uri) - if not scheme or not authority: - raise RelativeURIError("Only absolute URIs are allowed. uri = %s" % uri) - authority = authority.lower() - scheme = scheme.lower() - if not path: - path = "/" - # Could do syntax based normalization of the URI before - # computing the digest. See Section 6.2.2 of Std 66. - request_uri = query and "?".join([path, query]) or path - scheme = scheme.lower() - defrag_uri = scheme + "://" + authority + request_uri - return scheme, authority, request_uri, defrag_uri - - -# Cache filename construction (original borrowed from Venus http://intertwingly.net/code/venus/) -re_url_scheme = re.compile(r'^\w+://') -re_slash = re.compile(r'[?/:|]+') - -def safename(filename): - """Return a filename suitable for the cache. - - Strips dangerous and common characters to create a filename we - can use to store the cache in. - """ - - try: - if re_url_scheme.match(filename): - if isinstance(filename,str): - filename = filename.decode('utf-8') - filename = filename.encode('idna') - else: - filename = filename.encode('idna') - except UnicodeError: - pass - if isinstance(filename,unicode): - filename=filename.encode('utf-8') - filemd5 = _md5(filename).hexdigest() - filename = re_url_scheme.sub("", filename) - filename = re_slash.sub(",", filename) - - # limit length of filename - if len(filename)>200: - filename=filename[:200] - return ",".join((filename, filemd5)) - -NORMALIZE_SPACE = re.compile(r'(?:\r\n)?[ \t]+') -def _normalize_headers(headers): - return dict([ (key.lower(), NORMALIZE_SPACE.sub(value, ' ').strip()) for (key, value) in headers.iteritems()]) - -def _parse_cache_control(headers): - retval = {} - if headers.has_key('cache-control'): - parts = headers['cache-control'].split(',') - parts_with_args = [tuple([x.strip().lower() for x in part.split("=", 1)]) for part in parts if -1 != part.find("=")] - parts_wo_args = [(name.strip().lower(), 1) for name in parts if -1 == name.find("=")] - retval = dict(parts_with_args + parts_wo_args) - return retval - -# Whether to use a strict mode to parse WWW-Authenticate headers -# Might lead to bad results in case of ill-formed header value, -# so disabled by default, falling back to relaxed parsing. -# Set to true to turn on, usefull for testing servers. -USE_WWW_AUTH_STRICT_PARSING = 0 - -# In regex below: -# [^\0-\x1f\x7f-\xff()<>@,;:\\\"/[\]?={} \t]+ matches a "token" as defined by HTTP -# "(?:[^\0-\x08\x0A-\x1f\x7f-\xff\\\"]|\\[\0-\x7f])*?" matches a "quoted-string" as defined by HTTP, when LWS have already been replaced by a single space -# Actually, as an auth-param value can be either a token or a quoted-string, they are combined in a single pattern which matches both: -# \"?((?<=\")(?:[^\0-\x1f\x7f-\xff\\\"]|\\[\0-\x7f])*?(?=\")|(?@,;:\\\"/[\]?={} \t]+(?!\"))\"? -WWW_AUTH_STRICT = re.compile(r"^(?:\s*(?:,\s*)?([^\0-\x1f\x7f-\xff()<>@,;:\\\"/[\]?={} \t]+)\s*=\s*\"?((?<=\")(?:[^\0-\x08\x0A-\x1f\x7f-\xff\\\"]|\\[\0-\x7f])*?(?=\")|(?@,;:\\\"/[\]?={} \t]+(?!\"))\"?)(.*)$") -WWW_AUTH_RELAXED = re.compile(r"^(?:\s*(?:,\s*)?([^ \t\r\n=]+)\s*=\s*\"?((?<=\")(?:[^\\\"]|\\.)*?(?=\")|(? current_age: - retval = "FRESH" - return retval - -def _decompressContent(response, new_content): - content = new_content - try: - encoding = response.get('content-encoding', None) - if encoding in ['gzip', 'deflate']: - if encoding == 'gzip': - content = gzip.GzipFile(fileobj=StringIO.StringIO(new_content)).read() - if encoding == 'deflate': - content = zlib.decompress(content) - response['content-length'] = str(len(content)) - # Record the historical presence of the encoding in a way the won't interfere. - response['-content-encoding'] = response['content-encoding'] - del response['content-encoding'] - except IOError: - content = "" - raise FailedToDecompressContent(_("Content purported to be compressed with %s but failed to decompress.") % response.get('content-encoding'), response, content) - return content - -def _updateCache(request_headers, response_headers, content, cache, cachekey): - if cachekey: - cc = _parse_cache_control(request_headers) - cc_response = _parse_cache_control(response_headers) - if cc.has_key('no-store') or cc_response.has_key('no-store'): - cache.delete(cachekey) - else: - info = email.Message.Message() - for key, value in response_headers.iteritems(): - if key not in ['status','content-encoding','transfer-encoding']: - info[key] = value - - # Add annotations to the cache to indicate what headers - # are variant for this request. - vary = response_headers.get('vary', None) - if vary: - vary_headers = vary.lower().replace(' ', '').split(',') - for header in vary_headers: - key = '-varied-%s' % header - try: - info[key] = request_headers[header] - except KeyError: - pass - - status = response_headers.status - if status == 304: - status = 200 - - status_header = 'status: %d\r\n' % status - - header_str = info.as_string() - - header_str = re.sub("\r(?!\n)|(? 0: - service = "cl" - # No point in guessing Base or Spreadsheet - #elif request_uri.find("spreadsheets") > 0: - # service = "wise" - - auth = dict(Email=credentials[0], Passwd=credentials[1], service=service, source=headers['user-agent']) - resp, content = self.http.request("https://www.google.com/accounts/ClientLogin", method="POST", body=urlencode(auth), headers={'Content-Type': 'application/x-www-form-urlencoded'}) - lines = content.split('\n') - d = dict([tuple(line.split("=", 1)) for line in lines if line]) - if resp.status == 403: - self.Auth = "" - else: - self.Auth = d['Auth'] - - def request(self, method, request_uri, headers, content): - """Modify the request headers to add the appropriate - Authorization header.""" - headers['authorization'] = 'GoogleLogin Auth=' + self.Auth - - -AUTH_SCHEME_CLASSES = { - "basic": BasicAuthentication, - "wsse": WsseAuthentication, - "digest": DigestAuthentication, - "hmacdigest": HmacDigestAuthentication, - "googlelogin": GoogleLoginAuthentication -} - -AUTH_SCHEME_ORDER = ["hmacdigest", "googlelogin", "digest", "wsse", "basic"] - -class FileCache(object): - """Uses a local directory as a store for cached files. - Not really safe to use if multiple threads or processes are going to - be running on the same cache. - """ - def __init__(self, cache, safe=safename): # use safe=lambda x: md5.new(x).hexdigest() for the old behavior - self.cache = cache - self.safe = safe - if not os.path.exists(cache): - os.makedirs(self.cache) - - def get(self, key): - retval = None - cacheFullPath = os.path.join(self.cache, self.safe(key)) - try: - f = file(cacheFullPath, "rb") - retval = f.read() - f.close() - except IOError: - pass - return retval - - def set(self, key, value): - cacheFullPath = os.path.join(self.cache, self.safe(key)) - f = file(cacheFullPath, "wb") - f.write(value) - f.close() - - def delete(self, key): - cacheFullPath = os.path.join(self.cache, self.safe(key)) - if os.path.exists(cacheFullPath): - os.remove(cacheFullPath) - -class Credentials(object): - def __init__(self): - self.credentials = [] - - def add(self, name, password, domain=""): - self.credentials.append((domain.lower(), name, password)) - - def clear(self): - self.credentials = [] - - def iter(self, domain): - for (cdomain, name, password) in self.credentials: - if cdomain == "" or domain == cdomain: - yield (name, password) - -class KeyCerts(Credentials): - """Identical to Credentials except that - name/password are mapped to key/cert.""" - pass - -class AllHosts(object): - pass - -class ProxyInfo(object): - """Collect information required to use a proxy.""" - bypass_hosts = () - - def __init__(self, proxy_type, proxy_host, proxy_port, - proxy_rdns=True, proxy_user=None, proxy_pass=None): - """ - Args: - proxy_type: The type of proxy server. This must be set to one of - socks.PROXY_TYPE_XXX constants. For example: - - p = ProxyInfo(proxy_type=socks.PROXY_TYPE_HTTP, - proxy_host='localhost', proxy_port=8000) - - proxy_host: The hostname or IP address of the proxy server. - - proxy_port: The port that the proxy server is running on. - - proxy_rdns: If True (default), DNS queries will not be performed - locally, and instead, handed to the proxy to resolve. This is useful - if the network does not allow resolution of non-local names. In - httplib2 0.9 and earlier, this defaulted to False. - - proxy_user: The username used to authenticate with the proxy server. - - proxy_pass: The password used to authenticate with the proxy server. - """ - self.proxy_type = proxy_type - self.proxy_host = proxy_host - self.proxy_port = proxy_port - self.proxy_rdns = proxy_rdns - self.proxy_user = proxy_user - self.proxy_pass = proxy_pass - - def astuple(self): - return (self.proxy_type, self.proxy_host, self.proxy_port, - self.proxy_rdns, self.proxy_user, self.proxy_pass) - - def isgood(self): - return (self.proxy_host != None) and (self.proxy_port != None) - - def applies_to(self, hostname): - return not self.bypass_host(hostname) - - def bypass_host(self, hostname): - """Has this host been excluded from the proxy config""" - if self.bypass_hosts is AllHosts: - return True - - bypass = False - for domain in self.bypass_hosts: - if hostname.endswith(domain): - bypass = True - - return bypass - - -def proxy_info_from_environment(method='http'): - """ - Read proxy info from the environment variables. - """ - if method not in ['http', 'https']: - return - - env_var = method + '_proxy' - url = os.environ.get(env_var, os.environ.get(env_var.upper())) - if not url: - return - pi = proxy_info_from_url(url, method) - - no_proxy = os.environ.get('no_proxy', os.environ.get('NO_PROXY', '')) - bypass_hosts = [] - if no_proxy: - bypass_hosts = no_proxy.split(',') - # special case, no_proxy=* means all hosts bypassed - if no_proxy == '*': - bypass_hosts = AllHosts - - pi.bypass_hosts = bypass_hosts - return pi - -def proxy_info_from_url(url, method='http'): - """ - Construct a ProxyInfo from a URL (such as http_proxy env var) - """ - url = urlparse.urlparse(url) - username = None - password = None - port = None - if '@' in url[1]: - ident, host_port = url[1].split('@', 1) - if ':' in ident: - username, password = ident.split(':', 1) - else: - password = ident - else: - host_port = url[1] - if ':' in host_port: - host, port = host_port.split(':', 1) - else: - host = host_port - - if port: - port = int(port) - else: - port = dict(https=443, http=80)[method] - - proxy_type = 3 # socks.PROXY_TYPE_HTTP - return ProxyInfo( - proxy_type = proxy_type, - proxy_host = host, - proxy_port = port, - proxy_user = username or None, - proxy_pass = password or None, - ) - - -class HTTPConnectionWithTimeout(httplib.HTTPConnection): - """ - HTTPConnection subclass that supports timeouts - - All timeouts are in seconds. If None is passed for timeout then - Python's default timeout for sockets will be used. See for example - the docs of socket.setdefaulttimeout(): - http://docs.python.org/library/socket.html#socket.setdefaulttimeout - """ - - def __init__(self, host, port=None, strict=None, timeout=None, proxy_info=None): - httplib.HTTPConnection.__init__(self, host, port, strict) - self.timeout = timeout - self.proxy_info = proxy_info - - def connect(self): - """Connect to the host and port specified in __init__.""" - # Mostly verbatim from httplib.py. - if self.proxy_info and socks is None: - raise ProxiesUnavailableError( - 'Proxy support missing but proxy use was requested!') - msg = "getaddrinfo returns an empty list" - if self.proxy_info and self.proxy_info.isgood(): - use_proxy = True - proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass = self.proxy_info.astuple() - - host = proxy_host - port = proxy_port - else: - use_proxy = False - - host = self.host - port = self.port - - for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): - af, socktype, proto, canonname, sa = res - try: - if use_proxy: - self.sock = socks.socksocket(af, socktype, proto) - self.sock.setproxy(proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass) - else: - self.sock = socket.socket(af, socktype, proto) - self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - # Different from httplib: support timeouts. - if has_timeout(self.timeout): - self.sock.settimeout(self.timeout) - # End of difference from httplib. - if self.debuglevel > 0: - print "connect: (%s, %s) ************" % (self.host, self.port) - if use_proxy: - print "proxy: %s ************" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)) - - self.sock.connect((self.host, self.port) + sa[2:]) - except socket.error, msg: - if self.debuglevel > 0: - print "connect fail: (%s, %s)" % (self.host, self.port) - if use_proxy: - print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)) - if self.sock: - self.sock.close() - self.sock = None - continue - break - if not self.sock: - raise socket.error, msg - -class HTTPSConnectionWithTimeout(httplib.HTTPSConnection): - """ - This class allows communication via SSL. - - All timeouts are in seconds. If None is passed for timeout then - Python's default timeout for sockets will be used. See for example - the docs of socket.setdefaulttimeout(): - http://docs.python.org/library/socket.html#socket.setdefaulttimeout - """ - def __init__(self, host, port=None, key_file=None, cert_file=None, - strict=None, timeout=None, proxy_info=None, - ca_certs=None, disable_ssl_certificate_validation=False): - httplib.HTTPSConnection.__init__(self, host, port=port, - key_file=key_file, - cert_file=cert_file, strict=strict) - self.timeout = timeout - self.proxy_info = proxy_info - if ca_certs is None: - ca_certs = CA_CERTS - self.ca_certs = ca_certs - self.disable_ssl_certificate_validation = \ - disable_ssl_certificate_validation - - # The following two methods were adapted from https_wrapper.py, released - # with the Google Appengine SDK at - # http://googleappengine.googlecode.com/svn-history/r136/trunk/python/google/appengine/tools/https_wrapper.py - # under the following license: - # - # Copyright 2007 Google Inc. - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - # - - def _GetValidHostsForCert(self, cert): - """Returns a list of valid host globs for an SSL certificate. - - Args: - cert: A dictionary representing an SSL certificate. - Returns: - list: A list of valid host globs. - """ - if 'subjectAltName' in cert: - return [x[1] for x in cert['subjectAltName'] - if x[0].lower() == 'dns'] - else: - return [x[0][1] for x in cert['subject'] - if x[0][0].lower() == 'commonname'] - - def _ValidateCertificateHostname(self, cert, hostname): - """Validates that a given hostname is valid for an SSL certificate. - - Args: - cert: A dictionary representing an SSL certificate. - hostname: The hostname to test. - Returns: - bool: Whether or not the hostname is valid for this certificate. - """ - hosts = self._GetValidHostsForCert(cert) - for host in hosts: - host_re = host.replace('.', '\.').replace('*', '[^.]*') - if re.search('^%s$' % (host_re,), hostname, re.I): - return True - return False - - def connect(self): - "Connect to a host on a given (SSL) port." - - msg = "getaddrinfo returns an empty list" - if self.proxy_info and self.proxy_info.isgood(): - use_proxy = True - proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass = self.proxy_info.astuple() - - host = proxy_host - port = proxy_port - else: - use_proxy = False - - host = self.host - port = self.port - - address_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM) - for family, socktype, proto, canonname, sockaddr in address_info: - try: - if use_proxy: - sock = socks.socksocket(family, socktype, proto) - - sock.setproxy(proxy_type, proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass) - else: - sock = socket.socket(family, socktype, proto) - sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) - - if has_timeout(self.timeout): - sock.settimeout(self.timeout) - sock.connect((self.host, self.port)) - self.sock =_ssl_wrap_socket( - sock, self.key_file, self.cert_file, - self.disable_ssl_certificate_validation, self.ca_certs) - if self.debuglevel > 0: - print "connect: (%s, %s)" % (self.host, self.port) - if use_proxy: - print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)) - if not self.disable_ssl_certificate_validation: - cert = self.sock.getpeercert() - hostname = self.host.split(':', 0)[0] - if not self._ValidateCertificateHostname(cert, hostname): - raise CertificateHostnameMismatch( - 'Server presented certificate that does not match ' - 'host %s: %s' % (hostname, cert), hostname, cert) - except ssl_SSLError, e: - if sock: - sock.close() - if self.sock: - self.sock.close() - self.sock = None - # Unfortunately the ssl module doesn't seem to provide any way - # to get at more detailed error information, in particular - # whether the error is due to certificate validation or - # something else (such as SSL protocol mismatch). - if e.errno == ssl.SSL_ERROR_SSL: - raise SSLHandshakeError(e) - else: - raise - except (socket.timeout, socket.gaierror): - raise - except socket.error, msg: - if self.debuglevel > 0: - print "connect fail: (%s, %s)" % (self.host, self.port) - if use_proxy: - print "proxy: %s" % str((proxy_host, proxy_port, proxy_rdns, proxy_user, proxy_pass)) - if self.sock: - self.sock.close() - self.sock = None - continue - break - if not self.sock: - raise socket.error, msg - -SCHEME_TO_CONNECTION = { - 'http': HTTPConnectionWithTimeout, - 'https': HTTPSConnectionWithTimeout -} - -# Use a different connection object for Google App Engine -try: - try: - from google.appengine.api import apiproxy_stub_map - if apiproxy_stub_map.apiproxy.GetStub('urlfetch') is None: - raise ImportError # Bail out; we're not actually running on App Engine. - from google.appengine.api.urlfetch import fetch - from google.appengine.api.urlfetch import InvalidURLError - except (ImportError, AttributeError): - from google3.apphosting.api import apiproxy_stub_map - if apiproxy_stub_map.apiproxy.GetStub('urlfetch') is None: - raise ImportError # Bail out; we're not actually running on App Engine. - from google3.apphosting.api.urlfetch import fetch - from google3.apphosting.api.urlfetch import InvalidURLError - - def _new_fixed_fetch(validate_certificate): - def fixed_fetch(url, payload=None, method="GET", headers={}, - allow_truncated=False, follow_redirects=True, - deadline=None): - if deadline is None: - deadline = socket.getdefaulttimeout() or 5 - return fetch(url, payload=payload, method=method, headers=headers, - allow_truncated=allow_truncated, - follow_redirects=follow_redirects, deadline=deadline, - validate_certificate=validate_certificate) - return fixed_fetch - - class AppEngineHttpConnection(httplib.HTTPConnection): - """Use httplib on App Engine, but compensate for its weirdness. - - The parameters key_file, cert_file, proxy_info, ca_certs, and - disable_ssl_certificate_validation are all dropped on the ground. - """ - def __init__(self, host, port=None, key_file=None, cert_file=None, - strict=None, timeout=None, proxy_info=None, ca_certs=None, - disable_ssl_certificate_validation=False): - httplib.HTTPConnection.__init__(self, host, port=port, - strict=strict, timeout=timeout) - - class AppEngineHttpsConnection(httplib.HTTPSConnection): - """Same as AppEngineHttpConnection, but for HTTPS URIs.""" - def __init__(self, host, port=None, key_file=None, cert_file=None, - strict=None, timeout=None, proxy_info=None, ca_certs=None, - disable_ssl_certificate_validation=False): - httplib.HTTPSConnection.__init__(self, host, port=port, - key_file=key_file, - cert_file=cert_file, strict=strict, - timeout=timeout) - self._fetch = _new_fixed_fetch( - not disable_ssl_certificate_validation) - - # Update the connection classes to use the Googel App Engine specific ones. - SCHEME_TO_CONNECTION = { - 'http': AppEngineHttpConnection, - 'https': AppEngineHttpsConnection - } -except (ImportError, AttributeError): - pass - - -class Http(object): - """An HTTP client that handles: - - - all methods - - caching - - ETags - - compression, - - HTTPS - - Basic - - Digest - - WSSE - - and more. - """ - def __init__(self, cache=None, timeout=None, - proxy_info=proxy_info_from_environment, - ca_certs=None, disable_ssl_certificate_validation=False): - """If 'cache' is a string then it is used as a directory name for - a disk cache. Otherwise it must be an object that supports the - same interface as FileCache. - - All timeouts are in seconds. If None is passed for timeout - then Python's default timeout for sockets will be used. See - for example the docs of socket.setdefaulttimeout(): - http://docs.python.org/library/socket.html#socket.setdefaulttimeout - - `proxy_info` may be: - - a callable that takes the http scheme ('http' or 'https') and - returns a ProxyInfo instance per request. By default, uses - proxy_nfo_from_environment. - - a ProxyInfo instance (static proxy config). - - None (proxy disabled). - - ca_certs is the path of a file containing root CA certificates for SSL - server certificate validation. By default, a CA cert file bundled with - httplib2 is used. - - If disable_ssl_certificate_validation is true, SSL cert validation will - not be performed. - """ - self.proxy_info = proxy_info - self.ca_certs = ca_certs - self.disable_ssl_certificate_validation = \ - disable_ssl_certificate_validation - - # Map domain name to an httplib connection - self.connections = {} - # The location of the cache, for now a directory - # where cached responses are held. - if cache and isinstance(cache, basestring): - self.cache = FileCache(cache) - else: - self.cache = cache - - # Name/password - self.credentials = Credentials() - - # Key/cert - self.certificates = KeyCerts() - - # authorization objects - self.authorizations = [] - - # If set to False then no redirects are followed, even safe ones. - self.follow_redirects = True - - # Which HTTP methods do we apply optimistic concurrency to, i.e. - # which methods get an "if-match:" etag header added to them. - self.optimistic_concurrency_methods = ["PUT", "PATCH"] - - # If 'follow_redirects' is True, and this is set to True then - # all redirecs are followed, including unsafe ones. - self.follow_all_redirects = False - - self.ignore_etag = False - - self.force_exception_to_status_code = False - - self.timeout = timeout - - # Keep Authorization: headers on a redirect. - self.forward_authorization_headers = False - - def __getstate__(self): - state_dict = copy.copy(self.__dict__) - # In case request is augmented by some foreign object such as - # credentials which handle auth - if 'request' in state_dict: - del state_dict['request'] - if 'connections' in state_dict: - del state_dict['connections'] - return state_dict - - def __setstate__(self, state): - self.__dict__.update(state) - self.connections = {} - - def _auth_from_challenge(self, host, request_uri, headers, response, content): - """A generator that creates Authorization objects - that can be applied to requests. - """ - challenges = _parse_www_authenticate(response, 'www-authenticate') - for cred in self.credentials.iter(host): - for scheme in AUTH_SCHEME_ORDER: - if challenges.has_key(scheme): - yield AUTH_SCHEME_CLASSES[scheme](cred, host, request_uri, headers, response, content, self) - - def add_credentials(self, name, password, domain=""): - """Add a name and password that will be used - any time a request requires authentication.""" - self.credentials.add(name, password, domain) - - def add_certificate(self, key, cert, domain): - """Add a key and cert that will be used - any time a request requires authentication.""" - self.certificates.add(key, cert, domain) - - def clear_credentials(self): - """Remove all the names and passwords - that are used for authentication""" - self.credentials.clear() - self.authorizations = [] - - def _conn_request(self, conn, request_uri, method, body, headers): - i = 0 - seen_bad_status_line = False - while i < RETRIES: - i += 1 - try: - if hasattr(conn, 'sock') and conn.sock is None: - conn.connect() - conn.request(method, request_uri, body, headers) - except socket.timeout: - raise - except socket.gaierror: - conn.close() - raise ServerNotFoundError("Unable to find the server at %s" % conn.host) - except ssl_SSLError: - conn.close() - raise - except socket.error, e: - err = 0 - if hasattr(e, 'args'): - err = getattr(e, 'args')[0] - else: - err = e.errno - if err in (errno.ENETUNREACH, errno.EADDRNOTAVAIL) and i < RETRIES: - continue # retry on potentially transient socket errors - raise - except httplib.HTTPException: - # Just because the server closed the connection doesn't apparently mean - # that the server didn't send a response. - if hasattr(conn, 'sock') and conn.sock is None: - if i < RETRIES-1: - conn.close() - conn.connect() - continue - else: - conn.close() - raise - if i < RETRIES-1: - conn.close() - conn.connect() - continue - try: - response = conn.getresponse() - except httplib.BadStatusLine: - # If we get a BadStatusLine on the first try then that means - # the connection just went stale, so retry regardless of the - # number of RETRIES set. - if not seen_bad_status_line and i == 1: - i = 0 - seen_bad_status_line = True - conn.close() - conn.connect() - continue - else: - conn.close() - raise - except (socket.error, httplib.HTTPException): - if i < RETRIES-1: - conn.close() - conn.connect() - continue - else: - conn.close() - raise - else: - content = "" - if method == "HEAD": - conn.close() - else: - content = response.read() - response = Response(response) - if method != "HEAD": - content = _decompressContent(response, content) - break - return (response, content) - - - def _request(self, conn, host, absolute_uri, request_uri, method, body, headers, redirections, cachekey): - """Do the actual request using the connection object - and also follow one level of redirects if necessary""" - - auths = [(auth.depth(request_uri), auth) for auth in self.authorizations if auth.inscope(host, request_uri)] - auth = auths and sorted(auths)[0][1] or None - if auth: - auth.request(method, request_uri, headers, body) - - (response, content) = self._conn_request(conn, request_uri, method, body, headers) - - if auth: - if auth.response(response, body): - auth.request(method, request_uri, headers, body) - (response, content) = self._conn_request(conn, request_uri, method, body, headers ) - response._stale_digest = 1 - - if response.status == 401: - for authorization in self._auth_from_challenge(host, request_uri, headers, response, content): - authorization.request(method, request_uri, headers, body) - (response, content) = self._conn_request(conn, request_uri, method, body, headers, ) - if response.status != 401: - self.authorizations.append(authorization) - authorization.response(response, body) - break - - if (self.follow_all_redirects or (method in ["GET", "HEAD"]) or response.status == 303): - if self.follow_redirects and response.status in [300, 301, 302, 303, 307]: - # Pick out the location header and basically start from the beginning - # remembering first to strip the ETag header and decrement our 'depth' - if redirections: - if not response.has_key('location') and response.status != 300: - raise RedirectMissingLocation( _("Redirected but the response is missing a Location: header."), response, content) - # Fix-up relative redirects (which violate an RFC 2616 MUST) - if response.has_key('location'): - location = response['location'] - (scheme, authority, path, query, fragment) = parse_uri(location) - if authority == None: - response['location'] = urlparse.urljoin(absolute_uri, location) - if response.status == 301 and method in ["GET", "HEAD"]: - response['-x-permanent-redirect-url'] = response['location'] - if not response.has_key('content-location'): - response['content-location'] = absolute_uri - _updateCache(headers, response, content, self.cache, cachekey) - if headers.has_key('if-none-match'): - del headers['if-none-match'] - if headers.has_key('if-modified-since'): - del headers['if-modified-since'] - if 'authorization' in headers and not self.forward_authorization_headers: - del headers['authorization'] - if response.has_key('location'): - location = response['location'] - old_response = copy.deepcopy(response) - if not old_response.has_key('content-location'): - old_response['content-location'] = absolute_uri - redirect_method = method - if response.status in [302, 303]: - redirect_method = "GET" - body = None - (response, content) = self.request( - location, method=redirect_method, - body=body, headers=headers, - redirections=redirections - 1) - response.previous = old_response - else: - raise RedirectLimit("Redirected more times than rediection_limit allows.", response, content) - elif response.status in [200, 203] and method in ["GET", "HEAD"]: - # Don't cache 206's since we aren't going to handle byte range requests - if not response.has_key('content-location'): - response['content-location'] = absolute_uri - _updateCache(headers, response, content, self.cache, cachekey) - - return (response, content) - - def _normalize_headers(self, headers): - return _normalize_headers(headers) - -# Need to catch and rebrand some exceptions -# Then need to optionally turn all exceptions into status codes -# including all socket.* and httplib.* exceptions. - - - def request(self, uri, method="GET", body=None, headers=None, redirections=DEFAULT_MAX_REDIRECTS, connection_type=None): - """ Performs a single HTTP request. - - The 'uri' is the URI of the HTTP resource and can begin with either - 'http' or 'https'. The value of 'uri' must be an absolute URI. - - The 'method' is the HTTP method to perform, such as GET, POST, DELETE, - etc. There is no restriction on the methods allowed. - - The 'body' is the entity body to be sent with the request. It is a - string object. - - Any extra headers that are to be sent with the request should be - provided in the 'headers' dictionary. - - The maximum number of redirect to follow before raising an - exception is 'redirections. The default is 5. - - The return value is a tuple of (response, content), the first - being and instance of the 'Response' class, the second being - a string that contains the response entity body. - """ - try: - if headers is None: - headers = {} - else: - headers = self._normalize_headers(headers) - - if not headers.has_key('user-agent'): - headers['user-agent'] = "Python-httplib2/%s (gzip)" % __version__ - - uri = iri2uri(uri) - - (scheme, authority, request_uri, defrag_uri) = urlnorm(uri) - domain_port = authority.split(":")[0:2] - if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http': - scheme = 'https' - authority = domain_port[0] - - proxy_info = self._get_proxy_info(scheme, authority) - - conn_key = scheme+":"+authority - if conn_key in self.connections: - conn = self.connections[conn_key] - else: - if not connection_type: - connection_type = SCHEME_TO_CONNECTION[scheme] - certs = list(self.certificates.iter(authority)) - if scheme == 'https': - if certs: - conn = self.connections[conn_key] = connection_type( - authority, key_file=certs[0][0], - cert_file=certs[0][1], timeout=self.timeout, - proxy_info=proxy_info, - ca_certs=self.ca_certs, - disable_ssl_certificate_validation= - self.disable_ssl_certificate_validation) - else: - conn = self.connections[conn_key] = connection_type( - authority, timeout=self.timeout, - proxy_info=proxy_info, - ca_certs=self.ca_certs, - disable_ssl_certificate_validation= - self.disable_ssl_certificate_validation) - else: - conn = self.connections[conn_key] = connection_type( - authority, timeout=self.timeout, - proxy_info=proxy_info) - conn.set_debuglevel(debuglevel) - - if 'range' not in headers and 'accept-encoding' not in headers: - headers['accept-encoding'] = 'gzip, deflate' - - info = email.Message.Message() - cached_value = None - if self.cache: - cachekey = defrag_uri.encode('utf-8') - cached_value = self.cache.get(cachekey) - if cached_value: - # info = email.message_from_string(cached_value) - # - # Need to replace the line above with the kludge below - # to fix the non-existent bug not fixed in this - # bug report: http://mail.python.org/pipermail/python-bugs-list/2005-September/030289.html - try: - info, content = cached_value.split('\r\n\r\n', 1) - feedparser = email.FeedParser.FeedParser() - feedparser.feed(info) - info = feedparser.close() - feedparser._parse = None - except (IndexError, ValueError): - self.cache.delete(cachekey) - cachekey = None - cached_value = None - else: - cachekey = None - - if method in self.optimistic_concurrency_methods and self.cache and info.has_key('etag') and not self.ignore_etag and 'if-match' not in headers: - # http://www.w3.org/1999/04/Editing/ - headers['if-match'] = info['etag'] - - if method not in ["GET", "HEAD"] and self.cache and cachekey: - # RFC 2616 Section 13.10 - self.cache.delete(cachekey) - - # Check the vary header in the cache to see if this request - # matches what varies in the cache. - if method in ['GET', 'HEAD'] and 'vary' in info: - vary = info['vary'] - vary_headers = vary.lower().replace(' ', '').split(',') - for header in vary_headers: - key = '-varied-%s' % header - value = info[key] - if headers.get(header, None) != value: - cached_value = None - break - - if cached_value and method in ["GET", "HEAD"] and self.cache and 'range' not in headers: - if info.has_key('-x-permanent-redirect-url'): - # Should cached permanent redirects be counted in our redirection count? For now, yes. - if redirections <= 0: - raise RedirectLimit("Redirected more times than rediection_limit allows.", {}, "") - (response, new_content) = self.request( - info['-x-permanent-redirect-url'], method='GET', - headers=headers, redirections=redirections - 1) - response.previous = Response(info) - response.previous.fromcache = True - else: - # Determine our course of action: - # Is the cached entry fresh or stale? - # Has the client requested a non-cached response? - # - # There seems to be three possible answers: - # 1. [FRESH] Return the cache entry w/o doing a GET - # 2. [STALE] Do the GET (but add in cache validators if available) - # 3. [TRANSPARENT] Do a GET w/o any cache validators (Cache-Control: no-cache) on the request - entry_disposition = _entry_disposition(info, headers) - - if entry_disposition == "FRESH": - if not cached_value: - info['status'] = '504' - content = "" - response = Response(info) - if cached_value: - response.fromcache = True - return (response, content) - - if entry_disposition == "STALE": - if info.has_key('etag') and not self.ignore_etag and not 'if-none-match' in headers: - headers['if-none-match'] = info['etag'] - if info.has_key('last-modified') and not 'last-modified' in headers: - headers['if-modified-since'] = info['last-modified'] - elif entry_disposition == "TRANSPARENT": - pass - - (response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) - - if response.status == 304 and method == "GET": - # Rewrite the cache entry with the new end-to-end headers - # Take all headers that are in response - # and overwrite their values in info. - # unless they are hop-by-hop, or are listed in the connection header. - - for key in _get_end2end_headers(response): - info[key] = response[key] - merged_response = Response(info) - if hasattr(response, "_stale_digest"): - merged_response._stale_digest = response._stale_digest - _updateCache(headers, merged_response, content, self.cache, cachekey) - response = merged_response - response.status = 200 - response.fromcache = True - - elif response.status == 200: - content = new_content - else: - self.cache.delete(cachekey) - content = new_content - else: - cc = _parse_cache_control(headers) - if cc.has_key('only-if-cached'): - info['status'] = '504' - response = Response(info) - content = "" - else: - (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) - except Exception, e: - if self.force_exception_to_status_code: - if isinstance(e, HttpLib2ErrorWithResponse): - response = e.response - content = e.content - response.status = 500 - response.reason = str(e) - elif isinstance(e, socket.timeout): - content = "Request Timeout" - response = Response({ - "content-type": "text/plain", - "status": "408", - "content-length": len(content) - }) - response.reason = "Request Timeout" - else: - content = str(e) - response = Response({ - "content-type": "text/plain", - "status": "400", - "content-length": len(content) - }) - response.reason = "Bad Request" - else: - raise - - - return (response, content) - - def _get_proxy_info(self, scheme, authority): - """Return a ProxyInfo instance (or None) based on the scheme - and authority. - """ - hostname, port = urllib.splitport(authority) - proxy_info = self.proxy_info - if callable(proxy_info): - proxy_info = proxy_info(scheme) - - if (hasattr(proxy_info, 'applies_to') - and not proxy_info.applies_to(hostname)): - proxy_info = None - return proxy_info - - -class Response(dict): - """An object more like email.Message than httplib.HTTPResponse.""" - - """Is this response from our local cache""" - fromcache = False - - """HTTP protocol version used by server. 10 for HTTP/1.0, 11 for HTTP/1.1. """ - version = 11 - - "Status code returned by server. " - status = 200 - - """Reason phrase returned by server.""" - reason = "Ok" - - previous = None - - def __init__(self, info): - # info is either an email.Message or - # an httplib.HTTPResponse object. - if isinstance(info, httplib.HTTPResponse): - for key, value in info.getheaders(): - self[key.lower()] = value - self.status = info.status - self['status'] = str(self.status) - self.reason = info.reason - self.version = info.version - elif isinstance(info, email.Message.Message): - for key, value in info.items(): - self[key.lower()] = value - self.status = int(self['status']) - else: - for key, value in info.iteritems(): - self[key.lower()] = value - self.status = int(self.get('status', self.status)) - self.reason = self.get('reason', self.reason) - - - def __getattr__(self, name): - if name == 'dict': - return self - else: - raise AttributeError, name diff --git a/package/bin/da_ess_contentupdate/httplib2/cacerts.txt b/package/bin/da_ess_contentupdate/httplib2/cacerts.txt deleted file mode 100755 index 70990f1f82..0000000000 --- a/package/bin/da_ess_contentupdate/httplib2/cacerts.txt +++ /dev/null @@ -1,2183 +0,0 @@ -# Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc. -# Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc. -# Label: "GTE CyberTrust Global Root" -# Serial: 421 -# MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db -# SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 -# SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36 ------BEGIN CERTIFICATE----- -MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD -VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv -bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv -b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV -UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU -cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds -b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH -iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS -r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4 -04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r -GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9 -3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P -lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ ------END CERTIFICATE----- - -# Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division -# Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division -# Label: "Thawte Server CA" -# Serial: 1 -# MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d -# SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c -# SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9 ------BEGIN CERTIFICATE----- -MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx -FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD -VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm -MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx -MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT -DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3 -dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl -cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3 -DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD -gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91 -yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX -L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj -EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG -7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e -QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ -qdq5snUb9kLy78fyGPmJvKP/iiMucEc= ------END CERTIFICATE----- - -# Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division -# Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division -# Label: "Thawte Premium Server CA" -# Serial: 1 -# MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a -# SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a -# SHA256 Fingerprint: ab:70:36:36:5c:71:54:aa:29:c2:c2:9f:5d:41:91:16:3b:16:2a:22:25:01:13:57:d5:6d:07:ff:a7:bc:1f:72 ------BEGIN CERTIFICATE----- -MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx -FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD -VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv -biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy -dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t -MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB -MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG -A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp -b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl -cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv -bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE -VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ -ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR -uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG -9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI -hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM -pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg== ------END CERTIFICATE----- - -# Issuer: O=Equifax OU=Equifax Secure Certificate Authority -# Subject: O=Equifax OU=Equifax Secure Certificate Authority -# Label: "Equifax Secure CA" -# Serial: 903804111 -# MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b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wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA -A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y -7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh -1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4 ------END CERTIFICATE----- - -# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority -# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority -# Label: "Verisign Class 3 Public Primary Certification Authority" -# Serial: 149843929435818692848040365716851702463 -# MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67 -# SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2 -# SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70 ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG -A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz -cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 -MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV -BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt -YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN -ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE -BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is -I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G -CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do -lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc -AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k ------END CERTIFICATE----- - -# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network -# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network -# Label: "Verisign Class 3 Public Primary Certification Authority - G2" -# Serial: 167285380242319648451154478808036881606 -# MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9 -# SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f -# SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b ------BEGIN CERTIFICATE----- -MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ -BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh -c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy -MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp -emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X -DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw -FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg -UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo -YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 -MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB -AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4 -pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0 -13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID -AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk -U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i -F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY -oJ2daZH9 ------END CERTIFICATE----- - -# Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA -# Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA -# Label: "GlobalSign Root CA" -# Serial: 4835703278459707669005204 -# MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a -# SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c -# SHA256 Fingerprint: eb:d4:10:40:e4:b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gE -38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP -AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad -DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME -HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== ------END CERTIFICATE----- - -# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2 -# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2 -# Label: "GlobalSign Root CA - R2" -# Serial: 4835703278459682885658125 -# MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30 -# SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe -# SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e ------BEGIN CERTIFICATE----- -MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G -A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp -Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1 -MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG -A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL -v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8 -eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq -tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd -C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa -zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB -mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH -V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n -bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG -3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs -J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO -291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS -ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd -AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 -TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== ------END CERTIFICATE----- - -# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority -# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority -# Label: "ValiCert Class 1 VA" -# Serial: 1 -# MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb -# SHA1 Fingerprint: e5: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OBSoh8gfStadS/pyxtuJbdxdA6nLW -I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw -nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI ------END CERTIFICATE----- - -# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority -# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority -# Label: "ValiCert Class 2 VA" -# Serial: 1 -# MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87 -# SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6 -# SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b ------BEGIN CERTIFICATE----- -MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0 -IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz -BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y -aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG -9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy -NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y -azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs -YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw -Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl -cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY -dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9 -WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS -v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v -UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu -IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC -W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd ------END CERTIFICATE----- - -# Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority -# Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority -# Label: "RSA Root Certificate 1" -# Serial: 1 -# MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72 -# SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb -# SHA256 Fingerprint: bc:23:f9:8a:31:3c:b9:2d:e3:bb:fc:3a:5a:9f:44:61:ac:39:49:4c:4a:e1:5a:9e:9d:f1:31:e9:9b:73:01:9a ------BEGIN CERTIFICATE----- -MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0 -IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz -BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y -aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG -9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy -NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y -azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs -YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw -Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl -cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD -cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs -2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY -JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE -Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ -n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A -PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu ------END CERTIFICATE----- - -# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only -# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only -# Label: "Verisign Class 3 Public Primary Certification Authority - G3" -# Serial: 206684696279472310254277870180966723415 -# MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09 -# SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6 -# SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44 ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl -cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu -LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT -aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD -VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT -aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ -bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu -IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg -LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b -N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t -KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu -kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm -CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ -Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu -imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te -2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe -DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC -/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p -F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt -TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== ------END CERTIFICATE----- - -# Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only -# Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only -# Label: "Verisign Class 4 Public Primary Certification Authority - G3" -# Serial: 314531972711909413743075096039378935511 -# MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df -# SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d -# SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20: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DUPpNz+jDDZq3/ -ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1 -CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq -g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm -fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c -2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/ -bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== ------END CERTIFICATE----- - -# Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited -# Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited -# Label: "Entrust.net Secure Server CA" -# Serial: 927650371 -# MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee -# SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39 -# SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50 ------BEGIN CERTIFICATE----- -MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC -VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u -ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc -KGMpIDE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NybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0 -MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi -E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa -MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI -hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN -95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd -2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= ------END CERTIFICATE----- - -# Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited -# Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited -# Label: "Entrust.net Premium 2048 Secure Server CA" -# Serial: 946059622 -# MD5 Fingerprint: ba:21:ea:20:d6:dd:db:8f:c1:57:8b:40:ad:a1:fc:fc -# SHA1 Fingerprint: 80:1d:62:d0:7b:44:9d:5c:5c:03:5c:98:ea:61:fa:44:3c:2a:58:fe -# SHA256 Fingerprint: d1:c3:39:ea:27:84:eb:87:0f:93:4f:c5:63:4e:4a:a9:ad:55:05:01:64:01:f2:64:65:d3:7a:57:46:63:35:9f ------BEGIN CERTIFICATE----- -MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML -RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp -bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBs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20qMo -oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQ -h7A6tcOdBTcSo8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18 -f3v/rxzP5tsHrV7bhZ3QKw0z2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfN -B/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjXOP/swNlQ8C5LWK5Gb9Auw2DaclVy -vUxFnmG6v4SBkgPR0ml8xQ== ------END CERTIFICATE----- - -# Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust -# Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust -# Label: "Baltimore CyberTrust Root" -# Serial: 33554617 -# MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4 -# SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74 -# SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb ------BEGIN CERTIFICATE----- -MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ -RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD -VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX -DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y -ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy -VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr -mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr -IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK -mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu -XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy -dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye -jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 -BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3 -DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92 -9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx -jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0 -Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz -ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS -R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp ------END CERTIFICATE----- - -# Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc. -# Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc. -# Label: "Equifax Secure Global eBusiness CA" -# Serial: 1 -# MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc -# SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45 -# SHA256 Fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07 ------BEGIN CERTIFICATE----- -MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc -MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT -ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw -MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj -dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l -c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC -UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc -58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/ -o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH -MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr -aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA -A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA -Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv -8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV ------END CERTIFICATE----- - -# Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc. -# Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc. -# Label: "Equifax Secure eBusiness CA 1" -# Serial: 4 -# MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d -# SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41 -# SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73 ------BEGIN CERTIFICATE----- -MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc -MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT -ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw -MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j -LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ -KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo -RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu -WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw -Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD -AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK -eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM -zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+ -WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN -/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ== ------END CERTIFICATE----- - -# Issuer: O=Equifax Secure OU=Equifax Secure eBusiness CA-2 -# Subject: O=Equifax Secure OU=Equifax Secure eBusiness CA-2 -# Label: "Equifax Secure eBusiness CA 2" -# Serial: 930140085 -# MD5 Fingerprint: aa:bf:bf:64:97:da:98:1d:6f:c6:08:3a:95:70:33:ca -# SHA1 Fingerprint: 39:4f:f6:85:0b:06:be:52:e5:18:56:cc:10:e1:80:e8:82:b3:85:cc -# SHA256 Fingerprint: 2f:27:4e:48:ab:a4:ac:7b:76:59:33:10:17:75:50:6d:c3:0e:e3:8e:f6:ac:d5:c0:49:32:cf:e0:41:23:42:20 ------BEGIN CERTIFICATE----- -MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj -dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0 -NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD -VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B -AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G -vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/ -BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C -AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX -MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl -IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw -NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq -y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF -MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA -A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy -0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1 -E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN ------END CERTIFICATE----- - -# Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network -# Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network -# Label: "AddTrust Low-Value Services Root" -# Serial: 1 -# MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc -# SHA1 Fingerprint: cc:ab:0e:a0:4c:23:01:d6:69:7b:dd:37:9f:cd:12:eb:24:e3:94:9d -# SHA256 Fingerprint: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7 ------BEGIN CERTIFICATE----- -MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU -MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3 -b3JrMSEwHwYDVQQDExhB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ydYB7YHEt9tTEv2dB8Xfjea4MY -eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl -pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA -WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= ------END CERTIFICATE----- - -# Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network -# Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network -# Label: "AddTrust External Root" -# Serial: 1 -# MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f -# SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68 -# SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2 ------BEGIN CERTIFICATE----- -MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU -MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs -IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290 -MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux -FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h -bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt -H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9 -uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX -mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX -a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN -E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0 -WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD -VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0 -Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU -cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx -IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN -AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH -YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 -6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC -Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX -c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a -mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= ------END CERTIFICATE----- - -# Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network -# Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network -# Label: "AddTrust Public Services Root" -# Serial: 1 -# MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f -# SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5 -# SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27 ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU -MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3 -b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx -MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB -ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV -BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV -6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX -GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP -dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH -1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF -62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW -BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw -AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL -MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU -cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv -b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6 -IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/ -iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao -GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh -4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm -XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY= ------END CERTIFICATE----- - -# Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network -# Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network -# Label: "AddTrust Qualified Certificates Root" -# Serial: 1 -# MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb -# SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf -# SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16 ------BEGIN CERTIFICATE----- -MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBn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BABmrder4i2VhlRO6aQTv -hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm -hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X -dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3 -P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y -iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no -xqE= ------END CERTIFICATE----- - -# Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc. -# Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc. -# Label: "Entrust Root Certification Authority" -# Serial: 1164660820 -# MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4 -# SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9 -# SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c ------BEGIN CERTIFICATE----- -MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC -VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0 -Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW -KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl -cnRpZmljY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yYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua -AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP -9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/ -eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m -0vdXcDazv/wor3ElhVsT/h5/WrQ8 ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Global CA O=GeoTrust Inc. -# Subject: CN=GeoTrust Global CA O=GeoTrust Inc. -# Label: "GeoTrust Global CA" -# Serial: 144470 -# MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5 -# SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12 -# SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a ------BEGIN CERTIFICATE----- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg -R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 -9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq -fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv -iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU -1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ -bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW -MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA -ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l -uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn -Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS -tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF -PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un -hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV -5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc. -# Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc. -# Label: "GeoTrust Global CA 2" -# Serial: 1 -# MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9 -# SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d -# SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85 ------BEGIN CER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XLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF -I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz -4iIprn2DQKi6bA== ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc. -# Subject: CN=GeoTrust Universal CA O=GeoTrust Inc. -# Label: "GeoTrust Universal CA" -# Serial: 1 -# MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48 -# SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79 -# SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12 ------BEGIN CERTIFICATE----- -MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW -MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy -c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE -BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0 -IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV -VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8 -cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT -QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh -F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5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PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9 -ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt -DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm -bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw= ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc. -# Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc. -# Label: "GeoTrust Universal CA 2" -# Serial: 1 -# MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7 -# SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79 -# SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b ------BEGIN CERTIFICATE----- -MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW -MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy -c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD -VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1 -c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC -AQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0DE81 -WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUG -FF+3Qs17j1hhNNw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L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz -GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m -1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV -OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH -6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX -QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS ------END CERTIFICATE----- - -# Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc. -# Subject: CN=America Online Root Certification Authority 1 O=America Online Inc. -# Label: "America Online Root Certification Authority 1" -# Serial: 1 -# MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e -# SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a -# SHA256 Fingerprint: 77:40:73:12:c6:3a:15:3d:5b:c0:0b:4e:51:75:9c:df:da:c2:37:dc:2a:33:b6:79:46:e9:8e:9b:fa:68:0a:e3 ------BEGIN CERTIFICATE----- -MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc -MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP -bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2 -MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft -ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk -hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym -1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW -OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb -2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko -O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU -AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB -BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF -Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb -LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir -oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C -MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds -sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 ------END CERTIFICATE----- - -# Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc. -# Subject: CN=America Online Root Certification Authority 2 O=America Online Inc. -# Label: "America Online Root Certification Authority 2" -# Serial: 1 -# MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf -# SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84 -# SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd ------BEGIN CERTIFICATE----- -MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc -MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP -bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2 -MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft -ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC -206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci -KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2 -JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9 -BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e -Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B -PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67 -Xnfn6KVuY8INXWHQjNJsWiEOyi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X/9XhmgD0uRuMRUvAaw -RY8mkaKO/qk= ------END CERTIFICATE----- - -# Issuer: CN=AAA Certificate Services O=Comodo CA Limited -# Subject: CN=AAA Certificate Services O=Comodo CA Limited -# Label: "Comodo AAA Services root" -# Serial: 1 -# MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0 -# SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49 -# SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4 ------BEGIN CERTIFICATE----- -MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj -YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL -MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE -BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM -GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua -BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe -3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 -YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR -rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm -ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU -oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v -QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t -b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF -AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q -GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz -Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 -G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi -l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 -smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== ------END CERTIFICATE----- - -# Issuer: CN=Secure Certificate Services O=Comodo CA Limited -# Subject: CN=Secure Certificate Services O=Comodo CA Limited -# Label: "Comodo Secure Services root" -# Serial: 1 -# MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd -# SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1 -# SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a: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-Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw -Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww -DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0 -5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj -Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI -gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ -aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl -izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk= ------END CERTIFICATE----- - -# Issuer: CN=Trusted Certificate Services O=Comodo CA Limited -# Subject: CN=Trusted Certificate Services O=Comodo CA Limited -# Label: "Comodo Trusted Services root" -# Serial: 1 -# MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27 -# SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd -# SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69 ------BEGIN CERTIFICATE----- -MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb -MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow -GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0 -aWZpY2F0ZSBTZX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UD+Cl5EfKNsYEYwq5GWDVxIS -jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+ -xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn -dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi ------END CERTIFICATE----- - -# Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com -# Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com -# Label: "UTN DATACorp SGC Root CA" -# Serial: 91374294542884689855167577680241077609 -# MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06 -# SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4 -# SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48 ------BEGIN CERTIFICATE----- -MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB -kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw -IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG -EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD -VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3c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CERTIFICATE----- - -# Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com -# Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com -# Label: "UTN USERFirst Hardware Root CA" -# Serial: 91374294542884704022267039221184531197 -# MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39 -# SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7 -# SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37 ------BEGIN CERTIFICATE----- -MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB -lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug -Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt -SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG -A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe -MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v -d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh -cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn -0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ -M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a -MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd -oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI -DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy -oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD -VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0 -dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy -bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF -BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM -//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli -CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE -CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t -3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS -KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA== ------END CERTIFICATE----- - -# Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com -# Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com -# Label: "XRamp Global CA Root" -# Serial: 107108908803651509692980124233745014957 -# MD5 Fingerprint: a1:0b:44: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qiXtRYMh/MHJfNVi -PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P -BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs -jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0 -eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD -ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR -vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt -qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa -IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy -i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ -O+7ETPTsJ3xCwnR8gooJybQDJbw= ------END CERTIFICATE----- - -# Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority -# Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority -# Label: "Go Daddy Class 2 CA" -# Serial: 0 -# MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67 -# SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4 -# SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4 ------BEGIN CERTIFICATE----- -MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQ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MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P -TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER -dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf -ReYNnyicsbkqWletNw+vHX/bvZ8= ------END CERTIFICATE----- - -# Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority -# Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority -# Label: "Starfield Class 2 CA" -# Serial: 0 -# MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24 -# SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a -# SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58 ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl -MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp -U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw -NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE -ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp -ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 -DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf -8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN -+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 -X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa -K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA -1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G -A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR -zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 -YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD -bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 -L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D -eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp -VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY -WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- - -# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing -# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing -# Label: "StartCom Certification Authority" -# Serial: 1 -# MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16 -# SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f -# SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW -MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg -Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9 -MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi -U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh -cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA -A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk -pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf -OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C -Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT -Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi -HzvEvqBTViV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ovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ -YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT -TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ -9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8 -jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW -FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz -ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1 -ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L -EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu -L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC -O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V -um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh -NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14= ------END CERTIFICATE----- - -# Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com -# Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com -# Label: "DigiCert Assured ID Root CA" -# Serial: 17154717934120587862167794914071425081 -# MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72 -# SHA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AfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun -pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC -dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf -fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm -NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx -H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe -+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== ------END CERTIFICATE----- - -# Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com -# Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com -# Label: "DigiCert Global Root CA" -# Serial: 10944719598952040374951832963794454346 -# MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e -# SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36 -# SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61 ------BEGIN CERTIFICATE----- -MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD -QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT -MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j -b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB -CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 -nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt -43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P -T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 -gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO -BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR -TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw -DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr -hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg -06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF -PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls -YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk -CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= ------END CERTIFICATE----- - -# Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com -# Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com -# Label: "DigiCert High Assurance EV Root CA" -# Serial: 3553400076410547919724730734378100087 -# MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a -# SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25 -# SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 -d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j -ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug -RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm -+9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW -PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM -xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB -Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 -hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg -EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA -FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec -nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z -eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF -hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 -Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe -vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep -+OkuE6N36B9K ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc. -# Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc. -# Label: "GeoTrust Primary Certification Authority" -# Serial: 32798226551256963324313806436981982369 -# MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf -# SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96 -# SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY -MQswCQYDVQQGEwJVUzEWMBQG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Pj1K/fqynhG1riR/aYNKxoU -AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= ------END CERTIFICATE----- - -# Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only -# Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only -# Label: "thawte Primary Root CA" -# Serial: 69529181992039203566298953787712940909 -# MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12 -# SHA1 Fingerprint: 91:c6:d6:ee:3e:8a:c8:63:84:e5:48:c2:99:29:5c:75:6c:81:7b:81 -# SHA256 Fingerprint: 8d:72:2f:81:a9:c1:13:c0:79:1d:f1:36:a2:96:6d:b2:6c:95:0a:97:1d:b4:6b:41:99:f4:ea:54:b7:8b:fb:9f ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB -qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf -Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw -MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV -BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw -NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j -LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG -A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs -W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta -3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk -6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6 -Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J -NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA -MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP -r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU -DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz -YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX -xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2 -/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/ -LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7 -jVaMaA== ------END CERTIFICATE----- - -# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only -# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only -# Label: "VeriSign Class 3 Public Primary Certification Authority - G5" -# Serial: 33037644167568058970164719475676101450 -# MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c -# SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f:58:1e:ad:56:be:3d:9b:67:44:a5:e5 -# SHA256 Fingerprint: 9a:cf:ab:7e:43:c8:d8:80:d0:6b:26:2a:94:de:ee:e4:b4:65:99:89:c3:d0:ca:f1:9b:af:64:05:e4:1a:b7:df ------BEGIN CERTIFICATE----- -MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB -yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL -ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp -U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW -ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL -MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW -ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp -U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y -aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1 -nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex -t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz -SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG -BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+ -rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/ -NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E -BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH -BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy -aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv -MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE -p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y -5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK -WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ -4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N -hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq ------END CERTIFICATE----- - -# Issuer: CN=COMODO Certification Authority O=COMODO CA Limited -# Subject: CN=COMODO Certification Authority O=COMODO CA Limited -# Label: "COMODO Certification Authority" -# Serial: 104350513648249232941998508985834464573 -# MD5 Fingerprint: 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NH5YoZEr0ETc5O -nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW -/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g -PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u -QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY -SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv -IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ -RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4 -zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd -BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB -ZQ== ------END CERTIFICATE----- - -# Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C. -# Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C. -# Label: "Network Solutions Certificate Authority" -# Serial: 116697915152937497490437556386812487904 -# MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e -# SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce -# SHA256 Fingerprint: 15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c ------BEGIN CERTIFICATE----- -MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi -MQswCQYDVQQGE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jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH -/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv -wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN -pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey ------END CERTIFICATE----- - -# Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited -# Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited -# Label: "COMODO ECC Certification Authority" -# Serial: 41578283867086692638256921589707938090 -# MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23 -# SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11 -# SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7 ------BEGIN CERTIFICATE----- -MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL -MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE -BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT -IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw -MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy -ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N -T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR -FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J -cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW -BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ -BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm -fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv -GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= ------END CERTIFICATE----- - -# Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA -# Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA -# Label: "TC TrustCenter Class 2 CA II" -# Serial: 941389028203453866782103406992443 -# MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23 -# SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e -# SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70:46:1f:07:c0:a1:3e:ef:3a:1f:f7:17:53:8d:7a:ba:d3:91:b4 ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL -MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV -BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0 -Q2VudGVyIENsYX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CAQEAjNfffu4bgBCzg/XbEeprS6iS -GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt -ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8 -au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV -hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI -dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ== ------END CERTIFICATE----- - -# Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA -# Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA -# Label: "TC TrustCenter Class 3 CA II" -# Serial: 1506523511417715638772220530020799 -# MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e -# SHA1 Fingerprint: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5 -# SHA256 Fingerprint: 8d:a0:84:fc:f9:9c:e0:77:22:f8:9b:32:05:93:98:06:fa:5c:b8:11:e1:c8:13:f6:a1:08:c7:d3:36:b3:40:8e ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL -MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV -BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0 -Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1 -OTU5WjB2MQswCQYDVQQGEwJERTE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WXaiQYUlN6AT0PV8 -TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6 -g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB -95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj -S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A== ------END CERTIFICATE----- - -# Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA -# Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA -# Label: "TC TrustCenter Universal CA I" -# Serial: 601024842042189035295619584734726 -# MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c -# SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3 -# SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7 ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL -MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV -BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1 -c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx -MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg -R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5p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inc -# Label: "Cybertrust Global Root" -# Serial: 4835703278459682877484360 -# MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1 -# SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6 -# SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3 ------BEGIN CERTIFICATE----- -MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG -A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh -bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE -ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS -b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5 -7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS -J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y -HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP -t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz -FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY -XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/ -MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw -hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js -MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA -A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj -Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx -XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o -omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc -A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW -WL1WMRJOEcgh4LMRkWXbtKaIOM5V ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only -# Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only -# Label: "GeoTrust Primary Certification Authority - G3" -# Serial: 28809105769928564313984085209975885599 -# MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05 -# SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd -# SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4 ------BEGIN CERTIFICATE----- -MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB -mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT -MCh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WZXqxNT2I7BQMXXExZacse3aQHEerGD -AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH -SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G -spki4cErx5z481+oghLrGREt ------END CERTIFICATE----- - -# Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only -# Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only -# Label: "thawte Primary Root CA - G2" -# Serial: 71758320672825410020661621085256472406 -# MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f -# SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12 -# SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57 ------BEGIN CERTIFICATE----- -MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL -MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp -IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi -BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw -MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh -d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig -YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v -dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/ -BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6 -papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K -DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3 -KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox -XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== ------END CERTIFICATE----- - -# Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only -# Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only -# Label: "thawte Primary Root CA - G3" -# Serial: 127614157056681299805556476275995414779 -# MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31 -# SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89:ca:f3:6b:f2 -# SHA256 Fingerprint: 4b:03:f4:58:07:ad:70:f2:1b:fc:2c:ae:71:c9:fd:e4:60:4c:06:4c:f5:ff:b6:86:ba:e5:db:aa:d7:fd:d3:4c ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB -rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf -Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw -MDggdGhhd3Rl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A5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c -KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM -m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu -MdRAGmI0Nj81Aa6sY6A= ------END CERTIFICATE----- - -# Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only -# Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only -# Label: "GeoTrust Primary Certification Authority - G2" -# Serial: 80682863203381065782177908751794619243 -# MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a -# SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0 -# SHA256 Fingerprint: 5e:db:7a:c4:3b:82:a0:6a:87:61:e8:d7:be:49:79:eb:f2:61:1f:7d:d7:9b:f9:1c:1c:6b:56:6a:21:9e:d7:66 ------BEGIN CERTIFICATE----- -MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL -MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj -KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2 -MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 -eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV -BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw -NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV -BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH -MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL -So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal -tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO -BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG -CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT -qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz -rD6ogRLQy7rQkgu2npaqBA+K ------END CERTIFICATE----- - -# Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only -# Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only -# Label: "VeriSign Universal Root Certification Authority" -# Serial: 85209574734084581917763752644031726877 -# MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19 -# SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54 -# SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c ------BEGIN CERTIFICATE----- -MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB -vTELMAkGA1UEBhMCVVMxFzAVBg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xqGrI2Oa8PPgGrUSBgs -exkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud -DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4 -sAPmLGd75JR3Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+ -seQxIcaBlVZaDrHC1LGmWazxY8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz -4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+ -BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR -lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3 -7M2CYfE45k+XmCpajQ== ------END CERTIFICATE----- - -# Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only -# Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only -# Label: "VeriSign Class 3 Public Primary Certification Authority - G4" -# Serial: 63143484348153506665311985501458640051 -# MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41 -# SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a -# SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79 ------BEGIN CERTIFICATE----- -MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOP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oRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga -FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== ------END CERTIFICATE----- - -# Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority -# Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority -# Label: "Verisign Class 3 Public Primary Certification Authority" -# Serial: 80507572722862485515306429940691309246 -# MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4 -# SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b -# SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05 ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG -A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz -cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 -MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV -BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt -YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN -ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE -BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is -I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G -CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i -2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ -2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ ------END CERTIFICATE----- - -# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3 -# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3 -# Label: "GlobalSign Root CA - R3" -# Serial: 4835703278459759426209954 -# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28 -# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad -# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b ------BEGIN CERTIFICATE----- -MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G -A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp -Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4 -MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG -A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 -RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT -gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm -KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd -QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ -XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw -DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o -LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU -RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp -jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK -6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX -mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs -Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH -WD9f ------END CERTIFICATE----- - -# Issuer: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA -# Subject: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA -# Label: "TC TrustCenter Universal CA III" -# Serial: 2010889993983507346460533407902964 -# MD5 Fingerprint: 9f:dd:db:ab:ff:8e:ff:45:21:5f:f0:6c:9d:8f:fe:2b -# SHA1 Fingerprint: 96:56:cd:7b:57:96:98:95:d0:e1:41:46:68:06:fb:b8:c6:11:06:87 -# SHA256 Fingerprint: 30:9b:4a:87:f6:ca:56:c9:31:69:aa:a9:9c:6d:98:88:54:d7:89:2b:d5:43:7e:2d:07:b2:9c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42Fmhfz -dkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+KGwWaODIl0YgoGhnYIg5IFHY -aAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhKBgePxLcHsU0G -DeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV -CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPH -LQNjO9Po5KIqwoIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg== ------END CERTIFICATE----- - -# Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc. -# Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc. -# Label: "Go Daddy Root Certificate Authority - G2" -# Serial: 0 -# MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01 -# SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b -# SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da ------BEGIN CERTIFICATE----- -MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx -EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT -EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp -ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz -NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH -EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE -AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD -E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH -/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy -DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh -GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR -tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA -AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE -FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX -WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu -9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr -gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo -2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO -LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI -4uJEvlz36hz1 ------END CERTIFICATE----- - -# Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc. -# Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc. -# Label: "Starfield Root Certificate Authority - G2" -# Serial: 0 -# MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96 -# SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e -# SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5 ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx -EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT -HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs -ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw -MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 -b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj -aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp -Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg -nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1 -HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N -Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN -dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0 -HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO -BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G -CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU -sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3 -4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg -8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K -pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1 -mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 ------END CERTIFICATE----- - -# Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc. -# Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc. -# Label: "Starfield Services Root Certificate Authority - G2" -# Serial: 0 -# MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2 -# SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f -# SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5 ------BEGIN CERTIFICATE----- -MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx -EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT -HFN0YXJmaWVsZC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3zCepYoUz8jcI73HPdwbeyBkd -iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn -0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN -sSi6 ------END CERTIFICATE----- - -# Issuer: CN=AffirmTrust Commercial O=AffirmTrust -# Subject: CN=AffirmTrust Commercial O=AffirmTrust -# Label: "AffirmTrust Commercial" -# Serial: 8608355977964138876 -# MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7 -# SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7 -# SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9b:8d:48:60:c9:6f:5f:a7 ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz -dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL -MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp -cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP -Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr -ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL -MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1 -yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr -VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/ -nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ -KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG -XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj -vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt -Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g -N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC -nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= ------END CERTIFICATE----- - -# Issuer: CN=AffirmTrust Networking O=AffirmTrust -# Subject: CN=AffirmTrust Networking O=AffirmTrust -# Label: "AffirmTrust Networking" -# Serial: 8957382827206547757 -# MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f -# SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f -# SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQY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=AffirmTrust Premium O=AffirmTrust -# Subject: CN=AffirmTrust Premium O=AffirmTrust -# Label: "AffirmTrust Premium" -# Serial: 7893706540734352110 -# MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57 -# SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27 -# SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1:14:82:d5:bf:0e:69:8e:cc:49:8d:f5:25:77:eb:f2:e9:3b:9a ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz -dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG -A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U -cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf -qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ -JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ -+jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS -s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5 -HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7 -70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG -V+O61oV4d7pD6kh/9ti+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qANP2/7waj3VjFhT0+j/6e -KeC2uAloGRwYQw== ------END CERTIFICATE----- - -# Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust -# Subject: CN=AffirmTrust Premium ECC O=AffirmTrust -# Label: "AffirmTrust Premium ECC" -# Serial: 8401224907861490260 -# MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d -# SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb -# SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23 ------BEGIN CERTIFICATE----- -MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC -VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ -cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ -BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt -VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D -0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9 -ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G -A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G -A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs -aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I -flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ== ------END CERTIFICATE----- - -# Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing -# Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing -# Label: "StartCom Certification Authority" -# Serial: 45 -# MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16 -# SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0 -# SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11 ------BEGIN CERTIFICATE----- -MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW -MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg -Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9 -MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi -U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh -cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA -A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk -pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf -OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C -Ji/6tRYccjV3y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b2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93 -d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgG -CWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5fPGFf59Jb2vKXfuM/gTF -wWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWmN3PH/UvS -Ta0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst -0OcNOrg+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNc -pRJvkrKTlMeIFw6Ttn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKl -CcWw0bdT82AUuoVpaiF8H3VhFyAXe2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVF -P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK -1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm -KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE -JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ -8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm -fyWl8kgAwKQB2j8= ------END CERTIFICATE----- - -# Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd. -# Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd. -# Label: "StartCom Certification Authority G2" -# Serial: 59 -# MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64: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jAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/i -UUjXuG+v+E5+M5iSFGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9 -Ha90OrInwMEePnWjFqmveiJdnxMaz6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHg -TuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE -AwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJKoZIhvcNAQEL -BQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K -2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX -UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl -6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK -9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ -HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI -wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY -XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l -IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo -hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr -so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI ------END CERTIFICATE----- diff --git a/package/bin/da_ess_contentupdate/httplib2/iri2uri.py b/package/bin/da_ess_contentupdate/httplib2/iri2uri.py deleted file mode 100755 index d88c91fdfb..0000000000 --- a/package/bin/da_ess_contentupdate/httplib2/iri2uri.py +++ /dev/null @@ -1,110 +0,0 @@ -""" -iri2uri - -Converts an IRI to a URI. - -""" -__author__ = "Joe Gregorio (joe@bitworking.org)" -__copyright__ = "Copyright 2006, Joe Gregorio" -__contributors__ = [] -__version__ = "1.0.0" -__license__ = "MIT" -__history__ = """ -""" - -import urlparse - - -# Convert an IRI to a URI following the rules in RFC 3987 -# -# The characters we need to enocde and escape are defined in the spec: -# -# iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD -# ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF -# / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD -# / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD -# / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD -# / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD -# / %xD0000-DFFFD / %xE1000-EFFFD - -escape_range = [ - (0xA0, 0xD7FF), - (0xE000, 0xF8FF), - (0xF900, 0xFDCF), - (0xFDF0, 0xFFEF), - (0x10000, 0x1FFFD), - (0x20000, 0x2FFFD), - (0x30000, 0x3FFFD), - (0x40000, 0x4FFFD), - (0x50000, 0x5FFFD), - (0x60000, 0x6FFFD), - (0x70000, 0x7FFFD), - (0x80000, 0x8FFFD), - (0x90000, 0x9FFFD), - (0xA0000, 0xAFFFD), - (0xB0000, 0xBFFFD), - (0xC0000, 0xCFFFD), - (0xD0000, 0xDFFFD), - (0xE1000, 0xEFFFD), - (0xF0000, 0xFFFFD), - (0x100000, 0x10FFFD), -] - -def encode(c): - retval = c - i = ord(c) - for low, high in escape_range: - if i < low: - break - if i >= low and i <= high: - retval = "".join(["%%%2X" % ord(o) for o in c.encode('utf-8')]) - break - return retval - - -def iri2uri(uri): - """Convert an IRI to a URI. Note that IRIs must be - passed in a unicode strings. That is, do not utf-8 encode - the IRI before passing it into the function.""" - if isinstance(uri ,unicode): - (scheme, authority, path, query, fragment) = urlparse.urlsplit(uri) - authority = authority.encode('idna') - # For each character in 'ucschar' or 'iprivate' - # 1. encode as utf-8 - # 2. then %-encode each octet of that utf-8 - uri = urlparse.urlunsplit((scheme, authority, path, query, fragment)) - uri = "".join([encode(c) for c in uri]) - return uri - -if __name__ == "__main__": - import unittest - - class Test(unittest.TestCase): - - def test_uris(self): - """Test that URIs are invariant under the transformation.""" - invariant = [ - u"ftp://ftp.is.co.za/rfc/rfc1808.txt", - u"http://www.ietf.org/rfc/rfc2396.txt", - u"ldap://[2001:db8::7]/c=GB?objectClass?one", - u"mailto:John.Doe@example.com", - u"news:comp.infosystems.www.servers.unix", - u"tel:+1-816-555-1212", - u"telnet://192.0.2.16:80/", - u"urn:oasis:names:specification:docbook:dtd:xml:4.1.2" ] - for uri in invariant: - self.assertEqual(uri, iri2uri(uri)) - - def test_iri(self): - """ Test that the right type of escaping is done for each part of the URI.""" - self.assertEqual("http://xn--o3h.com/%E2%98%84", iri2uri(u"http://\N{COMET}.com/\N{COMET}")) - self.assertEqual("http://bitworking.org/?fred=%E2%98%84", iri2uri(u"http://bitworking.org/?fred=\N{COMET}")) - self.assertEqual("http://bitworking.org/#%E2%98%84", iri2uri(u"http://bitworking.org/#\N{COMET}")) - self.assertEqual("#%E2%98%84", iri2uri(u"#\N{COMET}")) - self.assertEqual("/fred?bar=%E2%98%9A#%E2%98%84", iri2uri(u"/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}")) - self.assertEqual("/fred?bar=%E2%98%9A#%E2%98%84", iri2uri(iri2uri(u"/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}"))) - self.assertNotEqual("/fred?bar=%E2%98%9A#%E2%98%84", iri2uri(u"/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}".encode('utf-8'))) - - unittest.main() - - diff --git a/package/bin/da_ess_contentupdate/httplib2/socks.py b/package/bin/da_ess_contentupdate/httplib2/socks.py deleted file mode 100755 index 0991f4cf6e..0000000000 --- a/package/bin/da_ess_contentupdate/httplib2/socks.py +++ /dev/null @@ -1,438 +0,0 @@ -"""SocksiPy - Python SOCKS module. -Version 1.00 - -Copyright 2006 Dan-Haim. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of Dan Haim nor the names of his contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL DAN HAIM OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMANGE. - - -This module provides a standard socket-like interface for Python -for tunneling connections through SOCKS proxies. - -""" - -""" - -Minor modifications made by Christopher Gilbert (http://motomastyle.com/) -for use in PyLoris (http://pyloris.sourceforge.net/) - -Minor modifications made by Mario Vilas (http://breakingcode.wordpress.com/) -mainly to merge bug fixes found in Sourceforge - -""" - -import base64 -import socket -import struct -import sys - -if getattr(socket, 'socket', None) is None: - raise ImportError('socket.socket missing, proxy support unusable') - -PROXY_TYPE_SOCKS4 = 1 -PROXY_TYPE_SOCKS5 = 2 -PROXY_TYPE_HTTP = 3 -PROXY_TYPE_HTTP_NO_TUNNEL = 4 - -_defaultproxy = None -_orgsocket = socket.socket - -class ProxyError(Exception): pass -class GeneralProxyError(ProxyError): pass -class Socks5AuthError(ProxyError): pass -class Socks5Error(ProxyError): pass -class Socks4Error(ProxyError): pass -class HTTPError(ProxyError): pass - -_generalerrors = ("success", - "invalid data", - "not connected", - "not available", - "bad proxy type", - "bad input") - -_socks5errors = ("succeeded", - "general SOCKS server failure", - "connection not allowed by ruleset", - "Network unreachable", - "Host unreachable", - "Connection refused", - "TTL expired", - "Command not supported", - "Address type not supported", - "Unknown error") - -_socks5autherrors = ("succeeded", - "authentication is required", - "all offered authentication methods were rejected", - "unknown username or invalid password", - "unknown error") - -_socks4errors = ("request granted", - "request rejected or failed", - "request rejected because SOCKS server cannot connect to identd on the client", - "request rejected because the client program and identd report different user-ids", - "unknown error") - -def setdefaultproxy(proxytype=None, addr=None, port=None, rdns=True, username=None, password=None): - """setdefaultproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) - Sets a default proxy which all further socksocket objects will use, - unless explicitly changed. - """ - global _defaultproxy - _defaultproxy = (proxytype, addr, port, rdns, username, password) - -def wrapmodule(module): - """wrapmodule(module) - Attempts to replace a module's socket library with a SOCKS socket. Must set - a default proxy using setdefaultproxy(...) first. - This will only work on modules that import socket directly into the namespace; - most of the Python Standard Library falls into this category. - """ - if _defaultproxy != None: - module.socket.socket = socksocket - else: - raise GeneralProxyError((4, "no proxy specified")) - -class socksocket(socket.socket): - """socksocket([family[, type[, proto]]]) -> socket object - Open a SOCKS enabled socket. The parameters are the same as - those of the standard socket init. In order for SOCKS to work, - you must specify family=AF_INET, type=SOCK_STREAM and proto=0. - """ - - def __init__(self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None): - _orgsocket.__init__(self, family, type, proto, _sock) - if _defaultproxy != None: - self.__proxy = _defaultproxy - else: - self.__proxy = (None, None, None, None, None, None) - self.__proxysockname = None - self.__proxypeername = None - self.__httptunnel = True - - def __recvall(self, count): - """__recvall(count) -> data - Receive EXACTLY the number of bytes requested from the socket. - Blocks until the required number of bytes have been received. - """ - data = self.recv(count) - while len(data) < count: - d = self.recv(count-len(data)) - if not d: raise GeneralProxyError((0, "connection closed unexpectedly")) - data = data + d - return data - - def sendall(self, content, *args): - """ override socket.socket.sendall method to rewrite the header - for non-tunneling proxies if needed - """ - if not self.__httptunnel: - content = self.__rewriteproxy(content) - return super(socksocket, self).sendall(content, *args) - - def __rewriteproxy(self, header): - """ rewrite HTTP request headers to support non-tunneling proxies - (i.e. those which do not support the CONNECT method). - This only works for HTTP (not HTTPS) since HTTPS requires tunneling. - """ - host, endpt = None, None - hdrs = header.split("\r\n") - for hdr in hdrs: - if hdr.lower().startswith("host:"): - host = hdr - elif hdr.lower().startswith("get") or hdr.lower().startswith("post"): - endpt = hdr - if host and endpt: - hdrs.remove(host) - hdrs.remove(endpt) - host = host.split(" ")[1] - endpt = endpt.split(" ") - if (self.__proxy[4] != None and self.__proxy[5] != None): - hdrs.insert(0, self.__getauthheader()) - hdrs.insert(0, "Host: %s" % host) - hdrs.insert(0, "%s http://%s%s %s" % (endpt[0], host, endpt[1], endpt[2])) - return "\r\n".join(hdrs) - - def __getauthheader(self): - auth = self.__proxy[4] + ":" + self.__proxy[5] - return "Proxy-Authorization: Basic " + base64.b64encode(auth) - - def setproxy(self, proxytype=None, addr=None, port=None, rdns=True, username=None, password=None): - """setproxy(proxytype, addr[, port[, rdns[, username[, password]]]]) - Sets the proxy to be used. - proxytype - The type of the proxy to be used. Three types - are supported: PROXY_TYPE_SOCKS4 (including socks4a), - PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP - addr - The address of the server (IP or DNS). - port - The port of the server. Defaults to 1080 for SOCKS - servers and 8080 for HTTP proxy servers. - rdns - Should DNS queries be preformed on the remote side - (rather than the local side). The default is True. - Note: This has no effect with SOCKS4 servers. - username - Username to authenticate with to the server. - The default is no authentication. - password - Password to authenticate with to the server. - Only relevant when username is also provided. - """ - self.__proxy = (proxytype, addr, port, rdns, username, password) - - def __negotiatesocks5(self, destaddr, destport): - """__negotiatesocks5(self,destaddr,destport) - Negotiates a connection through a SOCKS5 server. - """ - # First we'll send the authentication packages we support. - if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): - # The username/password details were supplied to the - # setproxy method so we support the USERNAME/PASSWORD - # authentication (in addition to the standard none). - self.sendall(struct.pack('BBBB', 0x05, 0x02, 0x00, 0x02)) - else: - # No username/password were entered, therefore we - # only support connections with no authentication. - self.sendall(struct.pack('BBB', 0x05, 0x01, 0x00)) - # We'll receive the server's response to determine which - # method was selected - chosenauth = self.__recvall(2) - if chosenauth[0:1] != chr(0x05).encode(): - self.close() - raise GeneralProxyError((1, _generalerrors[1])) - # Check the chosen authentication method - if chosenauth[1:2] == chr(0x00).encode(): - # No authentication is required - pass - elif chosenauth[1:2] == chr(0x02).encode(): - # Okay, we need to perform a basic username/password - # authentication. - self.sendall(chr(0x01).encode() + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.__proxy[5])) + self.__proxy[5]) - authstat = self.__recvall(2) - if authstat[0:1] != chr(0x01).encode(): - # Bad response - self.close() - raise GeneralProxyError((1, _generalerrors[1])) - if authstat[1:2] != chr(0x00).encode(): - # Authentication failed - self.close() - raise Socks5AuthError((3, _socks5autherrors[3])) - # Authentication succeeded - else: - # Reaching here is always bad - self.close() - if chosenauth[1] == chr(0xFF).encode(): - raise Socks5AuthError((2, _socks5autherrors[2])) - else: - raise GeneralProxyError((1, _generalerrors[1])) - # Now we can request the actual connection - req = struct.pack('BBB', 0x05, 0x01, 0x00) - # If the given destination address is an IP address, we'll - # use the IPv4 address request even if remote resolving was specified. - try: - ipaddr = socket.inet_aton(destaddr) - req = req + chr(0x01).encode() + ipaddr - except socket.error: - # Well it's not an IP number, so it's probably a DNS name. - if self.__proxy[3]: - # Resolve remotely - ipaddr = None - req = req + chr(0x03).encode() + chr(len(destaddr)).encode() + destaddr - else: - # Resolve locally - ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) - req = req + chr(0x01).encode() + ipaddr - req = req + struct.pack(">H", destport) - self.sendall(req) - # Get the response - resp = self.__recvall(4) - if resp[0:1] != chr(0x05).encode(): - self.close() - raise GeneralProxyError((1, _generalerrors[1])) - elif resp[1:2] != chr(0x00).encode(): - # Connection failed - self.close() - if ord(resp[1:2])<=8: - raise Socks5Error((ord(resp[1:2]), _socks5errors[ord(resp[1:2])])) - else: - raise Socks5Error((9, _socks5errors[9])) - # Get the bound address/port - elif resp[3:4] == chr(0x01).encode(): - boundaddr = self.__recvall(4) - elif resp[3:4] == chr(0x03).encode(): - resp = resp + self.recv(1) - boundaddr = self.__recvall(ord(resp[4:5])) - else: - self.close() - raise GeneralProxyError((1,_generalerrors[1])) - boundport = struct.unpack(">H", self.__recvall(2))[0] - self.__proxysockname = (boundaddr, boundport) - if ipaddr != None: - self.__proxypeername = (socket.inet_ntoa(ipaddr), destport) - else: - self.__proxypeername = (destaddr, destport) - - def getproxysockname(self): - """getsockname() -> address info - Returns the bound IP address and port number at the proxy. - """ - return self.__proxysockname - - def getproxypeername(self): - """getproxypeername() -> address info - Returns the IP and port number of the proxy. - """ - return _orgsocket.getpeername(self) - - def getpeername(self): - """getpeername() -> address info - Returns the IP address and port number of the destination - machine (note: getproxypeername returns the proxy) - """ - return self.__proxypeername - - def __negotiatesocks4(self,destaddr,destport): - """__negotiatesocks4(self,destaddr,destport) - Negotiates a connection through a SOCKS4 server. - """ - # Check if the destination address provided is an IP address - rmtrslv = False - try: - ipaddr = socket.inet_aton(destaddr) - except socket.error: - # It's a DNS name. Check where it should be resolved. - if self.__proxy[3]: - ipaddr = struct.pack("BBBB", 0x00, 0x00, 0x00, 0x01) - rmtrslv = True - else: - ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) - # Construct the request packet - req = struct.pack(">BBH", 0x04, 0x01, destport) + ipaddr - # The username parameter is considered userid for SOCKS4 - if self.__proxy[4] != None: - req = req + self.__proxy[4] - req = req + chr(0x00).encode() - # DNS name if remote resolving is required - # NOTE: This is actually an extension to the SOCKS4 protocol - # called SOCKS4A and may not be supported in all cases. - if rmtrslv: - req = req + destaddr + chr(0x00).encode() - self.sendall(req) - # Get the response from the server - resp = self.__recvall(8) - if resp[0:1] != chr(0x00).encode(): - # Bad data - self.close() - raise GeneralProxyError((1,_generalerrors[1])) - if resp[1:2] != chr(0x5A).encode(): - # Server returned an error - self.close() - if ord(resp[1:2]) in (91, 92, 93): - self.close() - raise Socks4Error((ord(resp[1:2]), _socks4errors[ord(resp[1:2]) - 90])) - else: - raise Socks4Error((94, _socks4errors[4])) - # Get the bound address/port - self.__proxysockname = (socket.inet_ntoa(resp[4:]), struct.unpack(">H", resp[2:4])[0]) - if rmtrslv != None: - self.__proxypeername = (socket.inet_ntoa(ipaddr), destport) - else: - self.__proxypeername = (destaddr, destport) - - def __negotiatehttp(self, destaddr, destport): - """__negotiatehttp(self,destaddr,destport) - Negotiates a connection through an HTTP server. - """ - # If we need to resolve locally, we do this now - if not self.__proxy[3]: - addr = socket.gethostbyname(destaddr) - else: - addr = destaddr - headers = ["CONNECT ", addr, ":", str(destport), " HTTP/1.1\r\n"] - headers += ["Host: ", destaddr, "\r\n"] - if (self.__proxy[4] != None and self.__proxy[5] != None): - headers += [self.__getauthheader(), "\r\n"] - headers.append("\r\n") - self.sendall("".join(headers).encode()) - # We read the response until we get the string "\r\n\r\n" - resp = self.recv(1) - while resp.find("\r\n\r\n".encode()) == -1: - resp = resp + self.recv(1) - # We just need the first line to check if the connection - # was successful - statusline = resp.splitlines()[0].split(" ".encode(), 2) - if statusline[0] not in ("HTTP/1.0".encode(), "HTTP/1.1".encode()): - self.close() - raise GeneralProxyError((1, _generalerrors[1])) - try: - statuscode = int(statusline[1]) - except ValueError: - self.close() - raise GeneralProxyError((1, _generalerrors[1])) - if statuscode != 200: - self.close() - raise HTTPError((statuscode, statusline[2])) - self.__proxysockname = ("0.0.0.0", 0) - self.__proxypeername = (addr, destport) - - def connect(self, destpair): - """connect(self, despair) - Connects to the specified destination through a proxy. - destpar - A tuple of the IP/DNS address and the port number. - (identical to socket's connect). - To select the proxy server use setproxy(). - """ - # Do a minimal input check first - if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or (not isinstance(destpair[0], basestring)) or (type(destpair[1]) != int): - raise GeneralProxyError((5, _generalerrors[5])) - if self.__proxy[0] == PROXY_TYPE_SOCKS5: - if self.__proxy[2] != None: - portnum = self.__proxy[2] - else: - portnum = 1080 - _orgsocket.connect(self, (self.__proxy[1], portnum)) - self.__negotiatesocks5(destpair[0], destpair[1]) - elif self.__proxy[0] == PROXY_TYPE_SOCKS4: - if self.__proxy[2] != None: - portnum = self.__proxy[2] - else: - portnum = 1080 - _orgsocket.connect(self,(self.__proxy[1], portnum)) - self.__negotiatesocks4(destpair[0], destpair[1]) - elif self.__proxy[0] == PROXY_TYPE_HTTP: - if self.__proxy[2] != None: - portnum = self.__proxy[2] - else: - portnum = 8080 - _orgsocket.connect(self,(self.__proxy[1], portnum)) - self.__negotiatehttp(destpair[0], destpair[1]) - elif self.__proxy[0] == PROXY_TYPE_HTTP_NO_TUNNEL: - if self.__proxy[2] != None: - portnum = self.__proxy[2] - else: - portnum = 8080 - _orgsocket.connect(self,(self.__proxy[1],portnum)) - if destpair[1] == 443: - self.__negotiatehttp(destpair[0],destpair[1]) - else: - self.__httptunnel = False - elif self.__proxy[0] == None: - _orgsocket.connect(self, (destpair[0], destpair[1])) - else: - raise GeneralProxyError((4, _generalerrors[4])) diff --git a/package/bin/da_ess_contentupdate/jinja2/__init__.py b/package/bin/da_ess_contentupdate/jinja2/__init__.py deleted file mode 100644 index 0eaf721499..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/__init__.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2 - ~~~~~~ - - Jinja2 is a template engine written in pure Python. It provides a - Django inspired non-XML syntax but supports inline expressions and - an optional sandboxed environment. - - Nutshell - -------- - - Here a small example of a Jinja2 template:: - - {% extends 'base.html' %} - {% block title %}Memberlist{% endblock %} - {% block content %} - - {% endblock %} - - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -__docformat__ = 'restructuredtext en' -__version__ = "2.10.3" - -# high level interface -from jinja2.environment import Environment, Template - -# loaders -from jinja2.loaders import BaseLoader, FileSystemLoader, PackageLoader, \ - DictLoader, FunctionLoader, PrefixLoader, ChoiceLoader, \ - ModuleLoader - -# bytecode caches -from jinja2.bccache import BytecodeCache, FileSystemBytecodeCache, \ - MemcachedBytecodeCache - -# undefined types -from jinja2.runtime import Undefined, DebugUndefined, StrictUndefined, \ - make_logging_undefined - -# exceptions -from jinja2.exceptions import TemplateError, UndefinedError, \ - TemplateNotFound, TemplatesNotFound, TemplateSyntaxError, \ - TemplateAssertionError, TemplateRuntimeError - -# decorators and public utilities -from jinja2.filters import environmentfilter, contextfilter, \ - evalcontextfilter -from jinja2.utils import Markup, escape, clear_caches, \ - environmentfunction, evalcontextfunction, contextfunction, \ - is_undefined, select_autoescape - -__all__ = [ - 'Environment', 'Template', 'BaseLoader', 'FileSystemLoader', - 'PackageLoader', 'DictLoader', 'FunctionLoader', 'PrefixLoader', - 'ChoiceLoader', 'BytecodeCache', 'FileSystemBytecodeCache', - 'MemcachedBytecodeCache', 'Undefined', 'DebugUndefined', - 'StrictUndefined', 'TemplateError', 'UndefinedError', 'TemplateNotFound', - 'TemplatesNotFound', 'TemplateSyntaxError', 'TemplateAssertionError', - 'TemplateRuntimeError', - 'ModuleLoader', 'environmentfilter', 'contextfilter', 'Markup', 'escape', - 'environmentfunction', 'contextfunction', 'clear_caches', 'is_undefined', - 'evalcontextfilter', 'evalcontextfunction', 'make_logging_undefined', - 'select_autoescape', -] - - -def _patch_async(): - from jinja2.utils import have_async_gen - if have_async_gen: - from jinja2.asyncsupport import patch_all - patch_all() - - -_patch_async() -del _patch_async diff --git a/package/bin/da_ess_contentupdate/jinja2/_compat.py b/package/bin/da_ess_contentupdate/jinja2/_compat.py deleted file mode 100644 index 4dbf6ea039..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/_compat.py +++ /dev/null @@ -1,105 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2._compat - ~~~~~~~~~~~~~~ - - Some py2/py3 compatibility support based on a stripped down - version of six so we don't have to depend on a specific version - of it. - - :copyright: Copyright 2013 by the Jinja team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" -import sys - -PY2 = sys.version_info[0] == 2 -PYPY = hasattr(sys, 'pypy_translation_info') -_identity = lambda x: x - - -if not PY2: - unichr = chr - range_type = range - text_type = str - string_types = (str,) - integer_types = (int,) - - iterkeys = lambda d: iter(d.keys()) - itervalues = lambda d: iter(d.values()) - iteritems = lambda d: iter(d.items()) - - import pickle - from io import BytesIO, StringIO - NativeStringIO = StringIO - - def reraise(tp, value, tb=None): - if value.__traceback__ is not tb: - raise value.with_traceback(tb) - raise value - - ifilter = filter - imap = map - izip = zip - intern = sys.intern - - implements_iterator = _identity - implements_to_string = _identity - encode_filename = _identity - -else: - unichr = unichr - text_type = unicode - range_type = xrange - string_types = (str, unicode) - integer_types = (int, long) - - iterkeys = lambda d: d.iterkeys() - itervalues = lambda d: d.itervalues() - iteritems = lambda d: d.iteritems() - - import cPickle as pickle - from cStringIO import StringIO as BytesIO, StringIO - NativeStringIO = BytesIO - - exec('def reraise(tp, value, tb=None):\n raise tp, value, tb') - - from itertools import imap, izip, ifilter - intern = intern - - def implements_iterator(cls): - cls.next = cls.__next__ - del cls.__next__ - return cls - - def implements_to_string(cls): - cls.__unicode__ = cls.__str__ - cls.__str__ = lambda x: x.__unicode__().encode('utf-8') - return cls - - def encode_filename(filename): - if isinstance(filename, unicode): - return filename.encode('utf-8') - return filename - - -def with_metaclass(meta, *bases): - """Create a base class with a metaclass.""" - # This requires a bit of explanation: the basic idea is to make a - # dummy metaclass for one level of class instantiation that replaces - # itself with the actual metaclass. - class metaclass(type): - def __new__(cls, name, this_bases, d): - return meta(name, bases, d) - return type.__new__(metaclass, 'temporary_class', (), {}) - - -try: - from urllib.parse import quote_from_bytes as url_quote -except ImportError: - from urllib import quote as url_quote - - -try: - from collections import abc -except ImportError: - import collections as abc diff --git a/package/bin/da_ess_contentupdate/jinja2/_identifier.py b/package/bin/da_ess_contentupdate/jinja2/_identifier.py deleted file mode 100644 index 2eac35d5c3..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/_identifier.py +++ /dev/null @@ -1,2 +0,0 @@ -# generated by scripts/generate_identifier_pattern.py -pattern = '·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఃా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-᪽ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰℘℮⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯︳︴﹍-﹏_𐇽𐋠𐍶-𐍺𐨁-𐨃𐨅𐨆𐨌-𐨏𐨸-𐨿𐨺𐫦𐫥𑀀-𑀂𑀸-𑁆𑁿-𑂂𑂰-𑂺𑄀-𑄂𑄧-𑅳𑄴𑆀-𑆂𑆳-𑇊𑇀-𑇌𑈬-𑈷𑈾𑋟-𑋪𑌀-𑌃𑌼𑌾-𑍄𑍇𑍈𑍋-𑍍𑍗𑍢𑍣𑍦-𑍬𑍰-𑍴𑐵-𑑆𑒰-𑓃𑖯-𑖵𑖸-𑗀𑗜𑗝𑘰-𑙀𑚫-𑚷𑜝-𑜫𑰯-𑰶𑰸-𑰿𑲒-𑲧𑲩-𑲶𖫰-𖫴𖬰-𖬶𖽑-𖽾𖾏-𖾒𛲝𛲞𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣𞀤𞀦-𞣐𞀪-𞣖𞥄-𞥊󠄀-󠇯' diff --git a/package/bin/da_ess_contentupdate/jinja2/asyncfilters.py b/package/bin/da_ess_contentupdate/jinja2/asyncfilters.py deleted file mode 100644 index 5c1f46d7fa..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/asyncfilters.py +++ /dev/null @@ -1,146 +0,0 @@ -from functools import wraps - -from jinja2.asyncsupport import auto_aiter -from jinja2 import filters - - -async def auto_to_seq(value): - seq = [] - if hasattr(value, '__aiter__'): - async for item in value: - seq.append(item) - else: - for item in value: - seq.append(item) - return seq - - -async def async_select_or_reject(args, kwargs, modfunc, lookup_attr): - seq, func = filters.prepare_select_or_reject( - args, kwargs, modfunc, lookup_attr) - if seq: - async for item in auto_aiter(seq): - if func(item): - yield item - - -def dualfilter(normal_filter, async_filter): - wrap_evalctx = False - if getattr(normal_filter, 'environmentfilter', False): - is_async = lambda args: args[0].is_async - wrap_evalctx = False - else: - if not getattr(normal_filter, 'evalcontextfilter', False) and \ - not getattr(normal_filter, 'contextfilter', False): - wrap_evalctx = True - is_async = lambda args: args[0].environment.is_async - - @wraps(normal_filter) - def wrapper(*args, **kwargs): - b = is_async(args) - if wrap_evalctx: - args = args[1:] - if b: - return async_filter(*args, **kwargs) - return normal_filter(*args, **kwargs) - - if wrap_evalctx: - wrapper.evalcontextfilter = True - - wrapper.asyncfiltervariant = True - - return wrapper - - -def asyncfiltervariant(original): - def decorator(f): - return dualfilter(original, f) - return decorator - - -@asyncfiltervariant(filters.do_first) -async def do_first(environment, seq): - try: - return await auto_aiter(seq).__anext__() - except StopAsyncIteration: - return environment.undefined('No first item, sequence was empty.') - - -@asyncfiltervariant(filters.do_groupby) -async def do_groupby(environment, value, attribute): - expr = filters.make_attrgetter(environment, attribute) - return [filters._GroupTuple(key, await auto_to_seq(values)) - for key, values in filters.groupby(sorted( - await auto_to_seq(value), key=expr), expr)] - - -@asyncfiltervariant(filters.do_join) -async def do_join(eval_ctx, value, d=u'', attribute=None): - return filters.do_join(eval_ctx, await auto_to_seq(value), d, attribute) - - -@asyncfiltervariant(filters.do_list) -async def do_list(value): - return await auto_to_seq(value) - - -@asyncfiltervariant(filters.do_reject) -async def do_reject(*args, **kwargs): - return async_select_or_reject(args, kwargs, lambda x: not x, False) - - -@asyncfiltervariant(filters.do_rejectattr) -async def do_rejectattr(*args, **kwargs): - return async_select_or_reject(args, kwargs, lambda x: not x, True) - - -@asyncfiltervariant(filters.do_select) -async def do_select(*args, **kwargs): - return async_select_or_reject(args, kwargs, lambda x: x, False) - - -@asyncfiltervariant(filters.do_selectattr) -async def do_selectattr(*args, **kwargs): - return async_select_or_reject(args, kwargs, lambda x: x, True) - - -@asyncfiltervariant(filters.do_map) -async def do_map(*args, **kwargs): - seq, func = filters.prepare_map(args, kwargs) - if seq: - async for item in auto_aiter(seq): - yield func(item) - - -@asyncfiltervariant(filters.do_sum) -async def do_sum(environment, iterable, attribute=None, start=0): - rv = start - if attribute is not None: - func = filters.make_attrgetter(environment, attribute) - else: - func = lambda x: x - async for item in auto_aiter(iterable): - rv += func(item) - return rv - - -@asyncfiltervariant(filters.do_slice) -async def do_slice(value, slices, fill_with=None): - return filters.do_slice(await auto_to_seq(value), slices, fill_with) - - -ASYNC_FILTERS = { - 'first': do_first, - 'groupby': do_groupby, - 'join': do_join, - 'list': do_list, - # we intentionally do not support do_last because that would be - # ridiculous - 'reject': do_reject, - 'rejectattr': do_rejectattr, - 'map': do_map, - 'select': do_select, - 'selectattr': do_selectattr, - 'sum': do_sum, - 'slice': do_slice, -} diff --git a/package/bin/da_ess_contentupdate/jinja2/asyncsupport.py b/package/bin/da_ess_contentupdate/jinja2/asyncsupport.py deleted file mode 100644 index b1e7b5ce9a..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/asyncsupport.py +++ /dev/null @@ -1,256 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.asyncsupport - ~~~~~~~~~~~~~~~~~~~ - - Has all the code for async support which is implemented as a patch - for supported Python versions. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -import sys -import asyncio -import inspect -from functools import update_wrapper - -from jinja2.utils import concat, internalcode, Markup -from jinja2.environment import TemplateModule -from jinja2.runtime import LoopContextBase, _last_iteration - - -async def concat_async(async_gen): - rv = [] - async def collect(): - async for event in async_gen: - rv.append(event) - await collect() - return concat(rv) - - -async def generate_async(self, *args, **kwargs): - vars = dict(*args, **kwargs) - try: - async for event in self.root_render_func(self.new_context(vars)): - yield event - except Exception: - exc_info = sys.exc_info() - else: - return - yield self.environment.handle_exception(exc_info, True) - - -def wrap_generate_func(original_generate): - def _convert_generator(self, loop, args, kwargs): - async_gen = self.generate_async(*args, **kwargs) - try: - while 1: - yield loop.run_until_complete(async_gen.__anext__()) - except StopAsyncIteration: - pass - def generate(self, *args, **kwargs): - if not self.environment.is_async: - return original_generate(self, *args, **kwargs) - return _convert_generator(self, asyncio.get_event_loop(), args, kwargs) - return update_wrapper(generate, original_generate) - - -async def render_async(self, *args, **kwargs): - if not self.environment.is_async: - raise RuntimeError('The environment was not created with async mode ' - 'enabled.') - - vars = dict(*args, **kwargs) - ctx = self.new_context(vars) - - try: - return await concat_async(self.root_render_func(ctx)) - except Exception: - exc_info = sys.exc_info() - return self.environment.handle_exception(exc_info, True) - - -def wrap_render_func(original_render): - def render(self, *args, **kwargs): - if not self.environment.is_async: - return original_render(self, *args, **kwargs) - loop = asyncio.get_event_loop() - return loop.run_until_complete(self.render_async(*args, **kwargs)) - return update_wrapper(render, original_render) - - -def wrap_block_reference_call(original_call): - @internalcode - async def async_call(self): - rv = await concat_async(self._stack[self._depth](self._context)) - if self._context.eval_ctx.autoescape: - rv = Markup(rv) - return rv - - @internalcode - def __call__(self): - if not self._context.environment.is_async: - return original_call(self) - return async_call(self) - - return update_wrapper(__call__, original_call) - - -def wrap_macro_invoke(original_invoke): - @internalcode - async def async_invoke(self, arguments, autoescape): - rv = await self._func(*arguments) - if autoescape: - rv = Markup(rv) - return rv - - @internalcode - def _invoke(self, arguments, autoescape): - if not self._environment.is_async: - return original_invoke(self, arguments, autoescape) - return async_invoke(self, arguments, autoescape) - return update_wrapper(_invoke, original_invoke) - - -@internalcode -async def get_default_module_async(self): - if self._module is not None: - return self._module - self._module = rv = await self.make_module_async() - return rv - - -def wrap_default_module(original_default_module): - @internalcode - def _get_default_module(self): - if self.environment.is_async: - raise RuntimeError('Template module attribute is unavailable ' - 'in async mode') - return original_default_module(self) - return _get_default_module - - -async def make_module_async(self, vars=None, shared=False, locals=None): - context = self.new_context(vars, shared, locals) - body_stream = [] - async for item in self.root_render_func(context): - body_stream.append(item) - return TemplateModule(self, context, body_stream) - - -def patch_template(): - from jinja2 import Template - Template.generate = wrap_generate_func(Template.generate) - Template.generate_async = update_wrapper( - generate_async, Template.generate_async) - Template.render_async = update_wrapper( - render_async, Template.render_async) - Template.render = wrap_render_func(Template.render) - Template._get_default_module = wrap_default_module( - Template._get_default_module) - Template._get_default_module_async = get_default_module_async - Template.make_module_async = update_wrapper( - make_module_async, Template.make_module_async) - - -def patch_runtime(): - from jinja2.runtime import BlockReference, Macro - BlockReference.__call__ = wrap_block_reference_call( - BlockReference.__call__) - Macro._invoke = wrap_macro_invoke(Macro._invoke) - - -def patch_filters(): - from jinja2.filters import FILTERS - from jinja2.asyncfilters import ASYNC_FILTERS - FILTERS.update(ASYNC_FILTERS) - - -def patch_all(): - patch_template() - patch_runtime() - patch_filters() - - -async def auto_await(value): - if inspect.isawaitable(value): - return await value - return value - - -async def auto_aiter(iterable): - if hasattr(iterable, '__aiter__'): - async for item in iterable: - yield item - return - for item in iterable: - yield item - - -class AsyncLoopContext(LoopContextBase): - - def __init__(self, async_iterator, undefined, after, length, recurse=None, - depth0=0): - LoopContextBase.__init__(self, undefined, recurse, depth0) - self._async_iterator = async_iterator - self._after = after - self._length = length - - @property - def length(self): - if self._length is None: - raise TypeError('Loop length for some iterators cannot be ' - 'lazily calculated in async mode') - return self._length - - def __aiter__(self): - return AsyncLoopContextIterator(self) - - -class AsyncLoopContextIterator(object): - __slots__ = ('context',) - - def __init__(self, context): - self.context = context - - def __aiter__(self): - return self - - async def __anext__(self): - ctx = self.context - ctx.index0 += 1 - if ctx._after is _last_iteration: - raise StopAsyncIteration() - ctx._before = ctx._current - ctx._current = ctx._after - try: - ctx._after = await ctx._async_iterator.__anext__() - except StopAsyncIteration: - ctx._after = _last_iteration - return ctx._current, ctx - - -async def make_async_loop_context(iterable, undefined, recurse=None, depth0=0): - # Length is more complicated and less efficient in async mode. The - # reason for this is that we cannot know if length will be used - # upfront but because length is a property we cannot lazily execute it - # later. This means that we need to buffer it up and measure :( - # - # We however only do this for actual iterators, not for async - # iterators as blocking here does not seem like the best idea in the - # world. - try: - length = len(iterable) - except (TypeError, AttributeError): - if not hasattr(iterable, '__aiter__'): - iterable = tuple(iterable) - length = len(iterable) - else: - length = None - async_iterator = auto_aiter(iterable) - try: - after = await async_iterator.__anext__() - except StopAsyncIteration: - after = _last_iteration - return AsyncLoopContext(async_iterator, undefined, after, length, recurse, - depth0) diff --git a/package/bin/da_ess_contentupdate/jinja2/bccache.py b/package/bin/da_ess_contentupdate/jinja2/bccache.py deleted file mode 100644 index 507a9b3dee..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/bccache.py +++ /dev/null @@ -1,361 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.bccache - ~~~~~~~~~~~~~~ - - This module implements the bytecode cache system Jinja is optionally - using. This is useful if you have very complex template situations and - the compiliation of all those templates slow down your application too - much. - - Situations where this is useful are often forking web applications that - are initialized on the first request. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD. -""" -from os import path, listdir -import os -import sys -import stat -import errno -import marshal -import tempfile -import fnmatch -from hashlib import sha1 -from jinja2.utils import open_if_exists -from jinja2._compat import BytesIO, pickle, PY2, text_type - - -# marshal works better on 3.x, one hack less required -if not PY2: - marshal_dump = marshal.dump - marshal_load = marshal.load -else: - - def marshal_dump(code, f): - if isinstance(f, file): - marshal.dump(code, f) - else: - f.write(marshal.dumps(code)) - - def marshal_load(f): - if isinstance(f, file): - return marshal.load(f) - return marshal.loads(f.read()) - - -bc_version = 3 - -# magic version used to only change with new jinja versions. With 2.6 -# we change this to also take Python version changes into account. The -# reason for this is that Python tends to segfault if fed earlier bytecode -# versions because someone thought it would be a good idea to reuse opcodes -# or make Python incompatible with earlier versions. -bc_magic = 'j2'.encode('ascii') + \ - pickle.dumps(bc_version, 2) + \ - pickle.dumps((sys.version_info[0] << 24) | sys.version_info[1]) - - -class Bucket(object): - """Buckets are used to store the bytecode for one template. It's created - and initialized by the bytecode cache and passed to the loading functions. - - The buckets get an internal checksum from the cache assigned and use this - to automatically reject outdated cache material. Individual bytecode - cache subclasses don't have to care about cache invalidation. - """ - - def __init__(self, environment, key, checksum): - self.environment = environment - self.key = key - self.checksum = checksum - self.reset() - - def reset(self): - """Resets the bucket (unloads the bytecode).""" - self.code = None - - def load_bytecode(self, f): - """Loads bytecode from a file or file like object.""" - # make sure the magic header is correct - magic = f.read(len(bc_magic)) - if magic != bc_magic: - self.reset() - return - # the source code of the file changed, we need to reload - checksum = pickle.load(f) - if self.checksum != checksum: - self.reset() - return - # if marshal_load fails then we need to reload - try: - self.code = marshal_load(f) - except (EOFError, ValueError, TypeError): - self.reset() - return - - def write_bytecode(self, f): - """Dump the bytecode into the file or file like object passed.""" - if self.code is None: - raise TypeError('can\'t write empty bucket') - f.write(bc_magic) - pickle.dump(self.checksum, f, 2) - marshal_dump(self.code, f) - - def bytecode_from_string(self, string): - """Load bytecode from a string.""" - self.load_bytecode(BytesIO(string)) - - def bytecode_to_string(self): - """Return the bytecode as string.""" - out = BytesIO() - self.write_bytecode(out) - return out.getvalue() - - -class BytecodeCache(object): - """To implement your own bytecode cache you have to subclass this class - and override :meth:`load_bytecode` and :meth:`dump_bytecode`. Both of - these methods are passed a :class:`~jinja2.bccache.Bucket`. - - A very basic bytecode cache that saves the bytecode on the file system:: - - from os import path - - class MyCache(BytecodeCache): - - def __init__(self, directory): - self.directory = directory - - def load_bytecode(self, bucket): - filename = path.join(self.directory, bucket.key) - if path.exists(filename): - with open(filename, 'rb') as f: - bucket.load_bytecode(f) - - def dump_bytecode(self, bucket): - filename = path.join(self.directory, bucket.key) - with open(filename, 'wb') as f: - bucket.write_bytecode(f) - - A more advanced version of a filesystem based bytecode cache is part of - Jinja2. - """ - - def load_bytecode(self, bucket): - """Subclasses have to override this method to load bytecode into a - bucket. If they are not able to find code in the cache for the - bucket, it must not do anything. - """ - raise NotImplementedError() - - def dump_bytecode(self, bucket): - """Subclasses have to override this method to write the bytecode - from a bucket back to the cache. If it unable to do so it must not - fail silently but raise an exception. - """ - raise NotImplementedError() - - def clear(self): - """Clears the cache. This method is not used by Jinja2 but should be - implemented to allow applications to clear the bytecode cache used - by a particular environment. - """ - - def get_cache_key(self, name, filename=None): - """Returns the unique hash key for this template name.""" - hash = sha1(name.encode('utf-8')) - if filename is not None: - filename = '|' + filename - if isinstance(filename, text_type): - filename = filename.encode('utf-8') - hash.update(filename) - return hash.hexdigest() - - def get_source_checksum(self, source): - """Returns a checksum for the source.""" - return sha1(source.encode('utf-8')).hexdigest() - - def get_bucket(self, environment, name, filename, source): - """Return a cache bucket for the given template. All arguments are - mandatory but filename may be `None`. - """ - key = self.get_cache_key(name, filename) - checksum = self.get_source_checksum(source) - bucket = Bucket(environment, key, checksum) - self.load_bytecode(bucket) - return bucket - - def set_bucket(self, bucket): - """Put the bucket into the cache.""" - self.dump_bytecode(bucket) - - -class FileSystemBytecodeCache(BytecodeCache): - """A bytecode cache that stores bytecode on the filesystem. It accepts - two arguments: The directory where the cache items are stored and a - pattern string that is used to build the filename. - - If no directory is specified a default cache directory is selected. On - Windows the user's temp directory is used, on UNIX systems a directory - is created for the user in the system temp directory. - - The pattern can be used to have multiple separate caches operate on the - same directory. The default pattern is ``'__jinja2_%s.cache'``. ``%s`` - is replaced with the cache key. - - >>> bcc = FileSystemBytecodeCache('/tmp/jinja_cache', '%s.cache') - - This bytecode cache supports clearing of the cache using the clear method. - """ - - def __init__(self, directory=None, pattern='__jinja2_%s.cache'): - if directory is None: - directory = self._get_default_cache_dir() - self.directory = directory - self.pattern = pattern - - def _get_default_cache_dir(self): - def _unsafe_dir(): - raise RuntimeError('Cannot determine safe temp directory. You ' - 'need to explicitly provide one.') - - tmpdir = tempfile.gettempdir() - - # On windows the temporary directory is used specific unless - # explicitly forced otherwise. We can just use that. - if os.name == 'nt': - return tmpdir - if not hasattr(os, 'getuid'): - _unsafe_dir() - - dirname = '_jinja2-cache-%d' % os.getuid() - actual_dir = os.path.join(tmpdir, dirname) - - try: - os.mkdir(actual_dir, stat.S_IRWXU) - except OSError as e: - if e.errno != errno.EEXIST: - raise - try: - os.chmod(actual_dir, stat.S_IRWXU) - actual_dir_stat = os.lstat(actual_dir) - if actual_dir_stat.st_uid != os.getuid() \ - or not stat.S_ISDIR(actual_dir_stat.st_mode) \ - or stat.S_IMODE(actual_dir_stat.st_mode) != stat.S_IRWXU: - _unsafe_dir() - except OSError as e: - if e.errno != errno.EEXIST: - raise - - actual_dir_stat = os.lstat(actual_dir) - if actual_dir_stat.st_uid != os.getuid() \ - or not stat.S_ISDIR(actual_dir_stat.st_mode) \ - or stat.S_IMODE(actual_dir_stat.st_mode) != stat.S_IRWXU: - _unsafe_dir() - - return actual_dir - - def _get_cache_filename(self, bucket): - return path.join(self.directory, self.pattern % bucket.key) - - def load_bytecode(self, bucket): - f = open_if_exists(self._get_cache_filename(bucket), 'rb') - if f is not None: - try: - bucket.load_bytecode(f) - finally: - f.close() - - def dump_bytecode(self, bucket): - f = open(self._get_cache_filename(bucket), 'wb') - try: - bucket.write_bytecode(f) - finally: - f.close() - - def clear(self): - # imported lazily here because google app-engine doesn't support - # write access on the file system and the function does not exist - # normally. - from os import remove - files = fnmatch.filter(listdir(self.directory), self.pattern % '*') - for filename in files: - try: - remove(path.join(self.directory, filename)) - except OSError: - pass - - -class MemcachedBytecodeCache(BytecodeCache): - """This class implements a bytecode cache that uses a memcache cache for - storing the information. It does not enforce a specific memcache library - (tummy's memcache or cmemcache) but will accept any class that provides - the minimal interface required. - - Libraries compatible with this class: - - - `cachelib `_ - - `python-memcached `_ - - (Unfortunately the django cache interface is not compatible because it - does not support storing binary data, only unicode. You can however pass - the underlying cache client to the bytecode cache which is available - as `django.core.cache.cache._client`.) - - The minimal interface for the client passed to the constructor is this: - - .. class:: MinimalClientInterface - - .. method:: set(key, value[, timeout]) - - Stores the bytecode in the cache. `value` is a string and - `timeout` the timeout of the key. If timeout is not provided - a default timeout or no timeout should be assumed, if it's - provided it's an integer with the number of seconds the cache - item should exist. - - .. method:: get(key) - - Returns the value for the cache key. If the item does not - exist in the cache the return value must be `None`. - - The other arguments to the constructor are the prefix for all keys that - is added before the actual cache key and the timeout for the bytecode in - the cache system. We recommend a high (or no) timeout. - - This bytecode cache does not support clearing of used items in the cache. - The clear method is a no-operation function. - - .. versionadded:: 2.7 - Added support for ignoring memcache errors through the - `ignore_memcache_errors` parameter. - """ - - def __init__(self, client, prefix='jinja2/bytecode/', timeout=None, - ignore_memcache_errors=True): - self.client = client - self.prefix = prefix - self.timeout = timeout - self.ignore_memcache_errors = ignore_memcache_errors - - def load_bytecode(self, bucket): - try: - code = self.client.get(self.prefix + bucket.key) - except Exception: - if not self.ignore_memcache_errors: - raise - code = None - if code is not None: - bucket.bytecode_from_string(code) - - def dump_bytecode(self, bucket): - args = (self.prefix + bucket.key, bucket.bytecode_to_string()) - if self.timeout is not None: - args += (self.timeout,) - try: - self.client.set(*args) - except Exception: - if not self.ignore_memcache_errors: - raise diff --git a/package/bin/da_ess_contentupdate/jinja2/compiler.py b/package/bin/da_ess_contentupdate/jinja2/compiler.py deleted file mode 100644 index d534a82739..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/compiler.py +++ /dev/null @@ -1,1721 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.compiler - ~~~~~~~~~~~~~~~ - - Compiles nodes into python code. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -from itertools import chain -from copy import deepcopy -from keyword import iskeyword as is_python_keyword -from functools import update_wrapper -from jinja2 import nodes -from jinja2.nodes import EvalContext -from jinja2.visitor import NodeVisitor -from jinja2.optimizer import Optimizer -from jinja2.exceptions import TemplateAssertionError -from jinja2.utils import Markup, concat, escape -from jinja2._compat import range_type, text_type, string_types, \ - iteritems, NativeStringIO, imap, izip -from jinja2.idtracking import Symbols, VAR_LOAD_PARAMETER, \ - VAR_LOAD_RESOLVE, VAR_LOAD_ALIAS, VAR_LOAD_UNDEFINED - - -operators = { - 'eq': '==', - 'ne': '!=', - 'gt': '>', - 'gteq': '>=', - 'lt': '<', - 'lteq': '<=', - 'in': 'in', - 'notin': 'not in' -} - -# what method to iterate over items do we want to use for dict iteration -# in generated code? on 2.x let's go with iteritems, on 3.x with items -if hasattr(dict, 'iteritems'): - dict_item_iter = 'iteritems' -else: - dict_item_iter = 'items' - -code_features = ['division'] - -# does this python version support generator stops? (PEP 0479) -try: - exec('from __future__ import generator_stop') - code_features.append('generator_stop') -except SyntaxError: - pass - -# does this python version support yield from? -try: - exec('def f(): yield from x()') -except SyntaxError: - supports_yield_from = False -else: - supports_yield_from = True - - -def optimizeconst(f): - def new_func(self, node, frame, **kwargs): - # Only optimize if the frame is not volatile - if self.optimized and not frame.eval_ctx.volatile: - new_node = self.optimizer.visit(node, frame.eval_ctx) - if new_node != node: - return self.visit(new_node, frame) - return f(self, node, frame, **kwargs) - return update_wrapper(new_func, f) - - -def generate(node, environment, name, filename, stream=None, - defer_init=False, optimized=True): - """Generate the python source for a node tree.""" - if not isinstance(node, nodes.Template): - raise TypeError('Can\'t compile non template nodes') - generator = environment.code_generator_class(environment, name, filename, - stream, defer_init, - optimized) - generator.visit(node) - if stream is None: - return generator.stream.getvalue() - - -def has_safe_repr(value): - """Does the node have a safe representation?""" - if value is None or value is NotImplemented or value is Ellipsis: - return True - if type(value) in (bool, int, float, complex, range_type, Markup) + string_types: - return True - if type(value) in (tuple, list, set, frozenset): - for item in value: - if not has_safe_repr(item): - return False - return True - elif type(value) is dict: - for key, value in iteritems(value): - if not has_safe_repr(key): - return False - if not has_safe_repr(value): - return False - return True - return False - - -def find_undeclared(nodes, names): - """Check if the names passed are accessed undeclared. The return value - is a set of all the undeclared names from the sequence of names found. - """ - visitor = UndeclaredNameVisitor(names) - try: - for node in nodes: - visitor.visit(node) - except VisitorExit: - pass - return visitor.undeclared - - -class MacroRef(object): - - def __init__(self, node): - self.node = node - self.accesses_caller = False - self.accesses_kwargs = False - self.accesses_varargs = False - - -class Frame(object): - """Holds compile time information for us.""" - - def __init__(self, eval_ctx, parent=None, level=None): - self.eval_ctx = eval_ctx - self.symbols = Symbols(parent and parent.symbols or None, - level=level) - - # a toplevel frame is the root + soft frames such as if conditions. - self.toplevel = False - - # the root frame is basically just the outermost frame, so no if - # conditions. This information is used to optimize inheritance - # situations. - self.rootlevel = False - - # in some dynamic inheritance situations the compiler needs to add - # write tests around output statements. - self.require_output_check = parent and parent.require_output_check - - # inside some tags we are using a buffer rather than yield statements. - # this for example affects {% filter %} or {% macro %}. If a frame - # is buffered this variable points to the name of the list used as - # buffer. - self.buffer = None - - # the name of the block we're in, otherwise None. - self.block = parent and parent.block or None - - # the parent of this frame - self.parent = parent - - if parent is not None: - self.buffer = parent.buffer - - def copy(self): - """Create a copy of the current one.""" - rv = object.__new__(self.__class__) - rv.__dict__.update(self.__dict__) - rv.symbols = self.symbols.copy() - return rv - - def inner(self, isolated=False): - """Return an inner frame.""" - if isolated: - return Frame(self.eval_ctx, level=self.symbols.level + 1) - return Frame(self.eval_ctx, self) - - def soft(self): - """Return a soft frame. A soft frame may not be modified as - standalone thing as it shares the resources with the frame it - was created of, but it's not a rootlevel frame any longer. - - This is only used to implement if-statements. - """ - rv = self.copy() - rv.rootlevel = False - return rv - - __copy__ = copy - - -class VisitorExit(RuntimeError): - """Exception used by the `UndeclaredNameVisitor` to signal a stop.""" - - -class DependencyFinderVisitor(NodeVisitor): - """A visitor that collects filter and test calls.""" - - def __init__(self): - self.filters = set() - self.tests = set() - - def visit_Filter(self, node): - self.generic_visit(node) - self.filters.add(node.name) - - def visit_Test(self, node): - self.generic_visit(node) - self.tests.add(node.name) - - def visit_Block(self, node): - """Stop visiting at blocks.""" - - -class UndeclaredNameVisitor(NodeVisitor): - """A visitor that checks if a name is accessed without being - declared. This is different from the frame visitor as it will - not stop at closure frames. - """ - - def __init__(self, names): - self.names = set(names) - self.undeclared = set() - - def visit_Name(self, node): - if node.ctx == 'load' and node.name in self.names: - self.undeclared.add(node.name) - if self.undeclared == self.names: - raise VisitorExit() - else: - self.names.discard(node.name) - - def visit_Block(self, node): - """Stop visiting a blocks.""" - - -class CompilerExit(Exception): - """Raised if the compiler encountered a situation where it just - doesn't make sense to further process the code. Any block that - raises such an exception is not further processed. - """ - - -class CodeGenerator(NodeVisitor): - - def __init__(self, environment, name, filename, stream=None, - defer_init=False, optimized=True): - if stream is None: - stream = NativeStringIO() - self.environment = environment - self.name = name - self.filename = filename - self.stream = stream - self.created_block_context = False - self.defer_init = defer_init - self.optimized = optimized - if optimized: - self.optimizer = Optimizer(environment) - - # aliases for imports - self.import_aliases = {} - - # a registry for all blocks. Because blocks are moved out - # into the global python scope they are registered here - self.blocks = {} - - # the number of extends statements so far - self.extends_so_far = 0 - - # some templates have a rootlevel extends. In this case we - # can safely assume that we're a child template and do some - # more optimizations. - self.has_known_extends = False - - # the current line number - self.code_lineno = 1 - - # registry of all filters and tests (global, not block local) - self.tests = {} - self.filters = {} - - # the debug information - self.debug_info = [] - self._write_debug_info = None - - # the number of new lines before the next write() - self._new_lines = 0 - - # the line number of the last written statement - self._last_line = 0 - - # true if nothing was written so far. - self._first_write = True - - # used by the `temporary_identifier` method to get new - # unique, temporary identifier - self._last_identifier = 0 - - # the current indentation - self._indentation = 0 - - # Tracks toplevel assignments - self._assign_stack = [] - - # Tracks parameter definition blocks - self._param_def_block = [] - - # Tracks the current context. - self._context_reference_stack = ['context'] - - # -- Various compilation helpers - - def fail(self, msg, lineno): - """Fail with a :exc:`TemplateAssertionError`.""" - raise TemplateAssertionError(msg, lineno, self.name, self.filename) - - def temporary_identifier(self): - """Get a new unique identifier.""" - self._last_identifier += 1 - return 't_%d' % self._last_identifier - - def buffer(self, frame): - """Enable buffering for the frame from that point onwards.""" - frame.buffer = self.temporary_identifier() - self.writeline('%s = []' % frame.buffer) - - def return_buffer_contents(self, frame, force_unescaped=False): - """Return the buffer contents of the frame.""" - if not force_unescaped: - if frame.eval_ctx.volatile: - self.writeline('if context.eval_ctx.autoescape:') - self.indent() - self.writeline('return Markup(concat(%s))' % frame.buffer) - self.outdent() - self.writeline('else:') - self.indent() - self.writeline('return concat(%s)' % frame.buffer) - self.outdent() - return - elif frame.eval_ctx.autoescape: - self.writeline('return Markup(concat(%s))' % frame.buffer) - return - self.writeline('return concat(%s)' % frame.buffer) - - def indent(self): - """Indent by one.""" - self._indentation += 1 - - def outdent(self, step=1): - """Outdent by step.""" - self._indentation -= step - - def start_write(self, frame, node=None): - """Yield or write into the frame buffer.""" - if frame.buffer is None: - self.writeline('yield ', node) - else: - self.writeline('%s.append(' % frame.buffer, node) - - def end_write(self, frame): - """End the writing process started by `start_write`.""" - if frame.buffer is not None: - self.write(')') - - def simple_write(self, s, frame, node=None): - """Simple shortcut for start_write + write + end_write.""" - self.start_write(frame, node) - self.write(s) - self.end_write(frame) - - def blockvisit(self, nodes, frame): - """Visit a list of nodes as block in a frame. If the current frame - is no buffer a dummy ``if 0: yield None`` is written automatically. - """ - try: - self.writeline('pass') - for node in nodes: - self.visit(node, frame) - except CompilerExit: - pass - - def write(self, x): - """Write a string into the output stream.""" - if self._new_lines: - if not self._first_write: - self.stream.write('\n' * self._new_lines) - self.code_lineno += self._new_lines - if self._write_debug_info is not None: - self.debug_info.append((self._write_debug_info, - self.code_lineno)) - self._write_debug_info = None - self._first_write = False - self.stream.write(' ' * self._indentation) - self._new_lines = 0 - self.stream.write(x) - - def writeline(self, x, node=None, extra=0): - """Combination of newline and write.""" - self.newline(node, extra) - self.write(x) - - def newline(self, node=None, extra=0): - """Add one or more newlines before the next write.""" - self._new_lines = max(self._new_lines, 1 + extra) - if node is not None and node.lineno != self._last_line: - self._write_debug_info = node.lineno - self._last_line = node.lineno - - def signature(self, node, frame, extra_kwargs=None): - """Writes a function call to the stream for the current node. - A leading comma is added automatically. The extra keyword - arguments may not include python keywords otherwise a syntax - error could occour. The extra keyword arguments should be given - as python dict. - """ - # if any of the given keyword arguments is a python keyword - # we have to make sure that no invalid call is created. - kwarg_workaround = False - for kwarg in chain((x.key for x in node.kwargs), extra_kwargs or ()): - if is_python_keyword(kwarg): - kwarg_workaround = True - break - - for arg in node.args: - self.write(', ') - self.visit(arg, frame) - - if not kwarg_workaround: - for kwarg in node.kwargs: - self.write(', ') - self.visit(kwarg, frame) - if extra_kwargs is not None: - for key, value in iteritems(extra_kwargs): - self.write(', %s=%s' % (key, value)) - if node.dyn_args: - self.write(', *') - self.visit(node.dyn_args, frame) - - if kwarg_workaround: - if node.dyn_kwargs is not None: - self.write(', **dict({') - else: - self.write(', **{') - for kwarg in node.kwargs: - self.write('%r: ' % kwarg.key) - self.visit(kwarg.value, frame) - self.write(', ') - if extra_kwargs is not None: - for key, value in iteritems(extra_kwargs): - self.write('%r: %s, ' % (key, value)) - if node.dyn_kwargs is not None: - self.write('}, **') - self.visit(node.dyn_kwargs, frame) - self.write(')') - else: - self.write('}') - - elif node.dyn_kwargs is not None: - self.write(', **') - self.visit(node.dyn_kwargs, frame) - - def pull_dependencies(self, nodes): - """Pull all the dependencies.""" - visitor = DependencyFinderVisitor() - for node in nodes: - visitor.visit(node) - for dependency in 'filters', 'tests': - mapping = getattr(self, dependency) - for name in getattr(visitor, dependency): - if name not in mapping: - mapping[name] = self.temporary_identifier() - self.writeline('%s = environment.%s[%r]' % - (mapping[name], dependency, name)) - - def enter_frame(self, frame): - undefs = [] - for target, (action, param) in iteritems(frame.symbols.loads): - if action == VAR_LOAD_PARAMETER: - pass - elif action == VAR_LOAD_RESOLVE: - self.writeline('%s = %s(%r)' % - (target, self.get_resolve_func(), param)) - elif action == VAR_LOAD_ALIAS: - self.writeline('%s = %s' % (target, param)) - elif action == VAR_LOAD_UNDEFINED: - undefs.append(target) - else: - raise NotImplementedError('unknown load instruction') - if undefs: - self.writeline('%s = missing' % ' = '.join(undefs)) - - def leave_frame(self, frame, with_python_scope=False): - if not with_python_scope: - undefs = [] - for target, _ in iteritems(frame.symbols.loads): - undefs.append(target) - if undefs: - self.writeline('%s = missing' % ' = '.join(undefs)) - - def func(self, name): - if self.environment.is_async: - return 'async def %s' % name - return 'def %s' % name - - def macro_body(self, node, frame): - """Dump the function def of a macro or call block.""" - frame = frame.inner() - frame.symbols.analyze_node(node) - macro_ref = MacroRef(node) - - explicit_caller = None - skip_special_params = set() - args = [] - for idx, arg in enumerate(node.args): - if arg.name == 'caller': - explicit_caller = idx - if arg.name in ('kwargs', 'varargs'): - skip_special_params.add(arg.name) - args.append(frame.symbols.ref(arg.name)) - - undeclared = find_undeclared(node.body, ('caller', 'kwargs', 'varargs')) - - if 'caller' in undeclared: - # In older Jinja2 versions there was a bug that allowed caller - # to retain the special behavior even if it was mentioned in - # the argument list. However thankfully this was only really - # working if it was the last argument. So we are explicitly - # checking this now and error out if it is anywhere else in - # the argument list. - if explicit_caller is not None: - try: - node.defaults[explicit_caller - len(node.args)] - except IndexError: - self.fail('When defining macros or call blocks the ' - 'special "caller" argument must be omitted ' - 'or be given a default.', node.lineno) - else: - args.append(frame.symbols.declare_parameter('caller')) - macro_ref.accesses_caller = True - if 'kwargs' in undeclared and not 'kwargs' in skip_special_params: - args.append(frame.symbols.declare_parameter('kwargs')) - macro_ref.accesses_kwargs = True - if 'varargs' in undeclared and not 'varargs' in skip_special_params: - args.append(frame.symbols.declare_parameter('varargs')) - macro_ref.accesses_varargs = True - - # macros are delayed, they never require output checks - frame.require_output_check = False - frame.symbols.analyze_node(node) - self.writeline('%s(%s):' % (self.func('macro'), ', '.join(args)), node) - self.indent() - - self.buffer(frame) - self.enter_frame(frame) - - self.push_parameter_definitions(frame) - for idx, arg in enumerate(node.args): - ref = frame.symbols.ref(arg.name) - self.writeline('if %s is missing:' % ref) - self.indent() - try: - default = node.defaults[idx - len(node.args)] - except IndexError: - self.writeline('%s = undefined(%r, name=%r)' % ( - ref, - 'parameter %r was not provided' % arg.name, - arg.name)) - else: - self.writeline('%s = ' % ref) - self.visit(default, frame) - self.mark_parameter_stored(ref) - self.outdent() - self.pop_parameter_definitions() - - self.blockvisit(node.body, frame) - self.return_buffer_contents(frame, force_unescaped=True) - self.leave_frame(frame, with_python_scope=True) - self.outdent() - - return frame, macro_ref - - def macro_def(self, macro_ref, frame): - """Dump the macro definition for the def created by macro_body.""" - arg_tuple = ', '.join(repr(x.name) for x in macro_ref.node.args) - name = getattr(macro_ref.node, 'name', None) - if len(macro_ref.node.args) == 1: - arg_tuple += ',' - self.write('Macro(environment, macro, %r, (%s), %r, %r, %r, ' - 'context.eval_ctx.autoescape)' % - (name, arg_tuple, macro_ref.accesses_kwargs, - macro_ref.accesses_varargs, macro_ref.accesses_caller)) - - def position(self, node): - """Return a human readable position for the node.""" - rv = 'line %d' % node.lineno - if self.name is not None: - rv += ' in ' + repr(self.name) - return rv - - def dump_local_context(self, frame): - return '{%s}' % ', '.join( - '%r: %s' % (name, target) for name, target - in iteritems(frame.symbols.dump_stores())) - - def write_commons(self): - """Writes a common preamble that is used by root and block functions. - Primarily this sets up common local helpers and enforces a generator - through a dead branch. - """ - self.writeline('resolve = context.resolve_or_missing') - self.writeline('undefined = environment.undefined') - self.writeline('if 0: yield None') - - def push_parameter_definitions(self, frame): - """Pushes all parameter targets from the given frame into a local - stack that permits tracking of yet to be assigned parameters. In - particular this enables the optimization from `visit_Name` to skip - undefined expressions for parameters in macros as macros can reference - otherwise unbound parameters. - """ - self._param_def_block.append(frame.symbols.dump_param_targets()) - - def pop_parameter_definitions(self): - """Pops the current parameter definitions set.""" - self._param_def_block.pop() - - def mark_parameter_stored(self, target): - """Marks a parameter in the current parameter definitions as stored. - This will skip the enforced undefined checks. - """ - if self._param_def_block: - self._param_def_block[-1].discard(target) - - def push_context_reference(self, target): - self._context_reference_stack.append(target) - - def pop_context_reference(self): - self._context_reference_stack.pop() - - def get_context_ref(self): - return self._context_reference_stack[-1] - - def get_resolve_func(self): - target = self._context_reference_stack[-1] - if target == 'context': - return 'resolve' - return '%s.resolve' % target - - def derive_context(self, frame): - return '%s.derived(%s)' % ( - self.get_context_ref(), - self.dump_local_context(frame), - ) - - def parameter_is_undeclared(self, target): - """Checks if a given target is an undeclared parameter.""" - if not self._param_def_block: - return False - return target in self._param_def_block[-1] - - def push_assign_tracking(self): - """Pushes a new layer for assignment tracking.""" - self._assign_stack.append(set()) - - def pop_assign_tracking(self, frame): - """Pops the topmost level for assignment tracking and updates the - context variables if necessary. - """ - vars = self._assign_stack.pop() - if not frame.toplevel or not vars: - return - public_names = [x for x in vars if x[:1] != '_'] - if len(vars) == 1: - name = next(iter(vars)) - ref = frame.symbols.ref(name) - self.writeline('context.vars[%r] = %s' % (name, ref)) - else: - self.writeline('context.vars.update({') - for idx, name in enumerate(vars): - if idx: - self.write(', ') - ref = frame.symbols.ref(name) - self.write('%r: %s' % (name, ref)) - self.write('})') - if public_names: - if len(public_names) == 1: - self.writeline('context.exported_vars.add(%r)' % - public_names[0]) - else: - self.writeline('context.exported_vars.update((%s))' % - ', '.join(imap(repr, public_names))) - - # -- Statement Visitors - - def visit_Template(self, node, frame=None): - assert frame is None, 'no root frame allowed' - eval_ctx = EvalContext(self.environment, self.name) - - from jinja2.runtime import __all__ as exported - self.writeline('from __future__ import %s' % ', '.join(code_features)) - self.writeline('from jinja2.runtime import ' + ', '.join(exported)) - - if self.environment.is_async: - self.writeline('from jinja2.asyncsupport import auto_await, ' - 'auto_aiter, make_async_loop_context') - - # if we want a deferred initialization we cannot move the - # environment into a local name - envenv = not self.defer_init and ', environment=environment' or '' - - # do we have an extends tag at all? If not, we can save some - # overhead by just not processing any inheritance code. - have_extends = node.find(nodes.Extends) is not None - - # find all blocks - for block in node.find_all(nodes.Block): - if block.name in self.blocks: - self.fail('block %r defined twice' % block.name, block.lineno) - self.blocks[block.name] = block - - # find all imports and import them - for import_ in node.find_all(nodes.ImportedName): - if import_.importname not in self.import_aliases: - imp = import_.importname - self.import_aliases[imp] = alias = self.temporary_identifier() - if '.' in imp: - module, obj = imp.rsplit('.', 1) - self.writeline('from %s import %s as %s' % - (module, obj, alias)) - else: - self.writeline('import %s as %s' % (imp, alias)) - - # add the load name - self.writeline('name = %r' % self.name) - - # generate the root render function. - self.writeline('%s(context, missing=missing%s):' % - (self.func('root'), envenv), extra=1) - self.indent() - self.write_commons() - - # process the root - frame = Frame(eval_ctx) - if 'self' in find_undeclared(node.body, ('self',)): - ref = frame.symbols.declare_parameter('self') - self.writeline('%s = TemplateReference(context)' % ref) - frame.symbols.analyze_node(node) - frame.toplevel = frame.rootlevel = True - frame.require_output_check = have_extends and not self.has_known_extends - if have_extends: - self.writeline('parent_template = None') - self.enter_frame(frame) - self.pull_dependencies(node.body) - self.blockvisit(node.body, frame) - self.leave_frame(frame, with_python_scope=True) - self.outdent() - - # make sure that the parent root is called. - if have_extends: - if not self.has_known_extends: - self.indent() - self.writeline('if parent_template is not None:') - self.indent() - if supports_yield_from and not self.environment.is_async: - self.writeline('yield from parent_template.' - 'root_render_func(context)') - else: - self.writeline('%sfor event in parent_template.' - 'root_render_func(context):' % - (self.environment.is_async and 'async ' or '')) - self.indent() - self.writeline('yield event') - self.outdent() - self.outdent(1 + (not self.has_known_extends)) - - # at this point we now have the blocks collected and can visit them too. - for name, block in iteritems(self.blocks): - self.writeline('%s(context, missing=missing%s):' % - (self.func('block_' + name), envenv), - block, 1) - self.indent() - self.write_commons() - # It's important that we do not make this frame a child of the - # toplevel template. This would cause a variety of - # interesting issues with identifier tracking. - block_frame = Frame(eval_ctx) - undeclared = find_undeclared(block.body, ('self', 'super')) - if 'self' in undeclared: - ref = block_frame.symbols.declare_parameter('self') - self.writeline('%s = TemplateReference(context)' % ref) - if 'super' in undeclared: - ref = block_frame.symbols.declare_parameter('super') - self.writeline('%s = context.super(%r, ' - 'block_%s)' % (ref, name, name)) - block_frame.symbols.analyze_node(block) - block_frame.block = name - self.enter_frame(block_frame) - self.pull_dependencies(block.body) - self.blockvisit(block.body, block_frame) - self.leave_frame(block_frame, with_python_scope=True) - self.outdent() - - self.writeline('blocks = {%s}' % ', '.join('%r: block_%s' % (x, x) - for x in self.blocks), - extra=1) - - # add a function that returns the debug info - self.writeline('debug_info = %r' % '&'.join('%s=%s' % x for x - in self.debug_info)) - - def visit_Block(self, node, frame): - """Call a block and register it for the template.""" - level = 0 - if frame.toplevel: - # if we know that we are a child template, there is no need to - # check if we are one - if self.has_known_extends: - return - if self.extends_so_far > 0: - self.writeline('if parent_template is None:') - self.indent() - level += 1 - - if node.scoped: - context = self.derive_context(frame) - else: - context = self.get_context_ref() - - if supports_yield_from and not self.environment.is_async and \ - frame.buffer is None: - self.writeline('yield from context.blocks[%r][0](%s)' % ( - node.name, context), node) - else: - loop = self.environment.is_async and 'async for' or 'for' - self.writeline('%s event in context.blocks[%r][0](%s):' % ( - loop, node.name, context), node) - self.indent() - self.simple_write('event', frame) - self.outdent() - - self.outdent(level) - - def visit_Extends(self, node, frame): - """Calls the extender.""" - if not frame.toplevel: - self.fail('cannot use extend from a non top-level scope', - node.lineno) - - # if the number of extends statements in general is zero so - # far, we don't have to add a check if something extended - # the template before this one. - if self.extends_so_far > 0: - - # if we have a known extends we just add a template runtime - # error into the generated code. We could catch that at compile - # time too, but i welcome it not to confuse users by throwing the - # same error at different times just "because we can". - if not self.has_known_extends: - self.writeline('if parent_template is not None:') - self.indent() - self.writeline('raise TemplateRuntimeError(%r)' % - 'extended multiple times') - - # if we have a known extends already we don't need that code here - # as we know that the template execution will end here. - if self.has_known_extends: - raise CompilerExit() - else: - self.outdent() - - self.writeline('parent_template = environment.get_template(', node) - self.visit(node.template, frame) - self.write(', %r)' % self.name) - self.writeline('for name, parent_block in parent_template.' - 'blocks.%s():' % dict_item_iter) - self.indent() - self.writeline('context.blocks.setdefault(name, []).' - 'append(parent_block)') - self.outdent() - - # if this extends statement was in the root level we can take - # advantage of that information and simplify the generated code - # in the top level from this point onwards - if frame.rootlevel: - self.has_known_extends = True - - # and now we have one more - self.extends_so_far += 1 - - def visit_Include(self, node, frame): - """Handles includes.""" - if node.ignore_missing: - self.writeline('try:') - self.indent() - - func_name = 'get_or_select_template' - if isinstance(node.template, nodes.Const): - if isinstance(node.template.value, string_types): - func_name = 'get_template' - elif isinstance(node.template.value, (tuple, list)): - func_name = 'select_template' - elif isinstance(node.template, (nodes.Tuple, nodes.List)): - func_name = 'select_template' - - self.writeline('template = environment.%s(' % func_name, node) - self.visit(node.template, frame) - self.write(', %r)' % self.name) - if node.ignore_missing: - self.outdent() - self.writeline('except TemplateNotFound:') - self.indent() - self.writeline('pass') - self.outdent() - self.writeline('else:') - self.indent() - - skip_event_yield = False - if node.with_context: - loop = self.environment.is_async and 'async for' or 'for' - self.writeline('%s event in template.root_render_func(' - 'template.new_context(context.get_all(), True, ' - '%s)):' % (loop, self.dump_local_context(frame))) - elif self.environment.is_async: - self.writeline('for event in (await ' - 'template._get_default_module_async())' - '._body_stream:') - else: - if supports_yield_from: - self.writeline('yield from template._get_default_module()' - '._body_stream') - skip_event_yield = True - else: - self.writeline('for event in template._get_default_module()' - '._body_stream:') - - if not skip_event_yield: - self.indent() - self.simple_write('event', frame) - self.outdent() - - if node.ignore_missing: - self.outdent() - - def visit_Import(self, node, frame): - """Visit regular imports.""" - self.writeline('%s = ' % frame.symbols.ref(node.target), node) - if frame.toplevel: - self.write('context.vars[%r] = ' % node.target) - if self.environment.is_async: - self.write('await ') - self.write('environment.get_template(') - self.visit(node.template, frame) - self.write(', %r).' % self.name) - if node.with_context: - self.write('make_module%s(context.get_all(), True, %s)' - % (self.environment.is_async and '_async' or '', - self.dump_local_context(frame))) - elif self.environment.is_async: - self.write('_get_default_module_async()') - else: - self.write('_get_default_module()') - if frame.toplevel and not node.target.startswith('_'): - self.writeline('context.exported_vars.discard(%r)' % node.target) - - def visit_FromImport(self, node, frame): - """Visit named imports.""" - self.newline(node) - self.write('included_template = %senvironment.get_template(' - % (self.environment.is_async and 'await ' or '')) - self.visit(node.template, frame) - self.write(', %r).' % self.name) - if node.with_context: - self.write('make_module%s(context.get_all(), True, %s)' - % (self.environment.is_async and '_async' or '', - self.dump_local_context(frame))) - elif self.environment.is_async: - self.write('_get_default_module_async()') - else: - self.write('_get_default_module()') - - var_names = [] - discarded_names = [] - for name in node.names: - if isinstance(name, tuple): - name, alias = name - else: - alias = name - self.writeline('%s = getattr(included_template, ' - '%r, missing)' % (frame.symbols.ref(alias), name)) - self.writeline('if %s is missing:' % frame.symbols.ref(alias)) - self.indent() - self.writeline('%s = undefined(%r %% ' - 'included_template.__name__, ' - 'name=%r)' % - (frame.symbols.ref(alias), - 'the template %%r (imported on %s) does ' - 'not export the requested name %s' % ( - self.position(node), - repr(name) - ), name)) - self.outdent() - if frame.toplevel: - var_names.append(alias) - if not alias.startswith('_'): - discarded_names.append(alias) - - if var_names: - if len(var_names) == 1: - name = var_names[0] - self.writeline('context.vars[%r] = %s' % - (name, frame.symbols.ref(name))) - else: - self.writeline('context.vars.update({%s})' % ', '.join( - '%r: %s' % (name, frame.symbols.ref(name)) for name in var_names - )) - if discarded_names: - if len(discarded_names) == 1: - self.writeline('context.exported_vars.discard(%r)' % - discarded_names[0]) - else: - self.writeline('context.exported_vars.difference_' - 'update((%s))' % ', '.join(imap(repr, discarded_names))) - - def visit_For(self, node, frame): - loop_frame = frame.inner() - test_frame = frame.inner() - else_frame = frame.inner() - - # try to figure out if we have an extended loop. An extended loop - # is necessary if the loop is in recursive mode if the special loop - # variable is accessed in the body. - extended_loop = node.recursive or 'loop' in \ - find_undeclared(node.iter_child_nodes( - only=('body',)), ('loop',)) - - loop_ref = None - if extended_loop: - loop_ref = loop_frame.symbols.declare_parameter('loop') - - loop_frame.symbols.analyze_node(node, for_branch='body') - if node.else_: - else_frame.symbols.analyze_node(node, for_branch='else') - - if node.test: - loop_filter_func = self.temporary_identifier() - test_frame.symbols.analyze_node(node, for_branch='test') - self.writeline('%s(fiter):' % self.func(loop_filter_func), node.test) - self.indent() - self.enter_frame(test_frame) - self.writeline(self.environment.is_async and 'async for ' or 'for ') - self.visit(node.target, loop_frame) - self.write(' in ') - self.write(self.environment.is_async and 'auto_aiter(fiter)' or 'fiter') - self.write(':') - self.indent() - self.writeline('if ', node.test) - self.visit(node.test, test_frame) - self.write(':') - self.indent() - self.writeline('yield ') - self.visit(node.target, loop_frame) - self.outdent(3) - self.leave_frame(test_frame, with_python_scope=True) - - # if we don't have an recursive loop we have to find the shadowed - # variables at that point. Because loops can be nested but the loop - # variable is a special one we have to enforce aliasing for it. - if node.recursive: - self.writeline('%s(reciter, loop_render_func, depth=0):' % - self.func('loop'), node) - self.indent() - self.buffer(loop_frame) - - # Use the same buffer for the else frame - else_frame.buffer = loop_frame.buffer - - # make sure the loop variable is a special one and raise a template - # assertion error if a loop tries to write to loop - if extended_loop: - self.writeline('%s = missing' % loop_ref) - - for name in node.find_all(nodes.Name): - if name.ctx == 'store' and name.name == 'loop': - self.fail('Can\'t assign to special loop variable ' - 'in for-loop target', name.lineno) - - if node.else_: - iteration_indicator = self.temporary_identifier() - self.writeline('%s = 1' % iteration_indicator) - - self.writeline(self.environment.is_async and 'async for ' or 'for ', node) - self.visit(node.target, loop_frame) - if extended_loop: - if self.environment.is_async: - self.write(', %s in await make_async_loop_context(' % loop_ref) - else: - self.write(', %s in LoopContext(' % loop_ref) - else: - self.write(' in ') - - if node.test: - self.write('%s(' % loop_filter_func) - if node.recursive: - self.write('reciter') - else: - if self.environment.is_async and not extended_loop: - self.write('auto_aiter(') - self.visit(node.iter, frame) - if self.environment.is_async and not extended_loop: - self.write(')') - if node.test: - self.write(')') - - if node.recursive: - self.write(', undefined, loop_render_func, depth):') - else: - self.write(extended_loop and ', undefined):' or ':') - - self.indent() - self.enter_frame(loop_frame) - - self.blockvisit(node.body, loop_frame) - if node.else_: - self.writeline('%s = 0' % iteration_indicator) - self.outdent() - self.leave_frame(loop_frame, with_python_scope=node.recursive - and not node.else_) - - if node.else_: - self.writeline('if %s:' % iteration_indicator) - self.indent() - self.enter_frame(else_frame) - self.blockvisit(node.else_, else_frame) - self.leave_frame(else_frame) - self.outdent() - - # if the node was recursive we have to return the buffer contents - # and start the iteration code - if node.recursive: - self.return_buffer_contents(loop_frame) - self.outdent() - self.start_write(frame, node) - if self.environment.is_async: - self.write('await ') - self.write('loop(') - if self.environment.is_async: - self.write('auto_aiter(') - self.visit(node.iter, frame) - if self.environment.is_async: - self.write(')') - self.write(', loop)') - self.end_write(frame) - - def visit_If(self, node, frame): - if_frame = frame.soft() - self.writeline('if ', node) - self.visit(node.test, if_frame) - self.write(':') - self.indent() - self.blockvisit(node.body, if_frame) - self.outdent() - for elif_ in node.elif_: - self.writeline('elif ', elif_) - self.visit(elif_.test, if_frame) - self.write(':') - self.indent() - self.blockvisit(elif_.body, if_frame) - self.outdent() - if node.else_: - self.writeline('else:') - self.indent() - self.blockvisit(node.else_, if_frame) - self.outdent() - - def visit_Macro(self, node, frame): - macro_frame, macro_ref = self.macro_body(node, frame) - self.newline() - if frame.toplevel: - if not node.name.startswith('_'): - self.write('context.exported_vars.add(%r)' % node.name) - ref = frame.symbols.ref(node.name) - self.writeline('context.vars[%r] = ' % node.name) - self.write('%s = ' % frame.symbols.ref(node.name)) - self.macro_def(macro_ref, macro_frame) - - def visit_CallBlock(self, node, frame): - call_frame, macro_ref = self.macro_body(node, frame) - self.writeline('caller = ') - self.macro_def(macro_ref, call_frame) - self.start_write(frame, node) - self.visit_Call(node.call, frame, forward_caller=True) - self.end_write(frame) - - def visit_FilterBlock(self, node, frame): - filter_frame = frame.inner() - filter_frame.symbols.analyze_node(node) - self.enter_frame(filter_frame) - self.buffer(filter_frame) - self.blockvisit(node.body, filter_frame) - self.start_write(frame, node) - self.visit_Filter(node.filter, filter_frame) - self.end_write(frame) - self.leave_frame(filter_frame) - - def visit_With(self, node, frame): - with_frame = frame.inner() - with_frame.symbols.analyze_node(node) - self.enter_frame(with_frame) - for idx, (target, expr) in enumerate(izip(node.targets, node.values)): - self.newline() - self.visit(target, with_frame) - self.write(' = ') - self.visit(expr, frame) - self.blockvisit(node.body, with_frame) - self.leave_frame(with_frame) - - def visit_ExprStmt(self, node, frame): - self.newline(node) - self.visit(node.node, frame) - - def visit_Output(self, node, frame): - # if we have a known extends statement, we don't output anything - # if we are in a require_output_check section - if self.has_known_extends and frame.require_output_check: - return - - allow_constant_finalize = True - if self.environment.finalize: - func = self.environment.finalize - if getattr(func, 'contextfunction', False) or \ - getattr(func, 'evalcontextfunction', False): - allow_constant_finalize = False - elif getattr(func, 'environmentfunction', False): - finalize = lambda x: text_type( - self.environment.finalize(self.environment, x)) - else: - finalize = lambda x: text_type(self.environment.finalize(x)) - else: - finalize = text_type - - # if we are inside a frame that requires output checking, we do so - outdent_later = False - if frame.require_output_check: - self.writeline('if parent_template is None:') - self.indent() - outdent_later = True - - # try to evaluate as many chunks as possible into a static - # string at compile time. - body = [] - for child in node.nodes: - try: - if not allow_constant_finalize: - raise nodes.Impossible() - const = child.as_const(frame.eval_ctx) - except nodes.Impossible: - body.append(child) - continue - # the frame can't be volatile here, becaus otherwise the - # as_const() function would raise an Impossible exception - # at that point. - try: - if frame.eval_ctx.autoescape: - if hasattr(const, '__html__'): - const = const.__html__() - else: - const = escape(const) - const = finalize(const) - except Exception: - # if something goes wrong here we evaluate the node - # at runtime for easier debugging - body.append(child) - continue - if body and isinstance(body[-1], list): - body[-1].append(const) - else: - body.append([const]) - - # if we have less than 3 nodes or a buffer we yield or extend/append - if len(body) < 3 or frame.buffer is not None: - if frame.buffer is not None: - # for one item we append, for more we extend - if len(body) == 1: - self.writeline('%s.append(' % frame.buffer) - else: - self.writeline('%s.extend((' % frame.buffer) - self.indent() - for item in body: - if isinstance(item, list): - val = repr(concat(item)) - if frame.buffer is None: - self.writeline('yield ' + val) - else: - self.writeline(val + ',') - else: - if frame.buffer is None: - self.writeline('yield ', item) - else: - self.newline(item) - close = 1 - if frame.eval_ctx.volatile: - self.write('(escape if context.eval_ctx.autoescape' - ' else to_string)(') - elif frame.eval_ctx.autoescape: - self.write('escape(') - else: - self.write('to_string(') - if self.environment.finalize is not None: - self.write('environment.finalize(') - if getattr(self.environment.finalize, - "contextfunction", False): - self.write('context, ') - close += 1 - self.visit(item, frame) - self.write(')' * close) - if frame.buffer is not None: - self.write(',') - if frame.buffer is not None: - # close the open parentheses - self.outdent() - self.writeline(len(body) == 1 and ')' or '))') - - # otherwise we create a format string as this is faster in that case - else: - format = [] - arguments = [] - for item in body: - if isinstance(item, list): - format.append(concat(item).replace('%', '%%')) - else: - format.append('%s') - arguments.append(item) - self.writeline('yield ') - self.write(repr(concat(format)) + ' % (') - self.indent() - for argument in arguments: - self.newline(argument) - close = 0 - if frame.eval_ctx.volatile: - self.write('(escape if context.eval_ctx.autoescape else' - ' to_string)(') - close += 1 - elif frame.eval_ctx.autoescape: - self.write('escape(') - close += 1 - if self.environment.finalize is not None: - self.write('environment.finalize(') - if getattr(self.environment.finalize, - 'contextfunction', False): - self.write('context, ') - elif getattr(self.environment.finalize, - 'evalcontextfunction', False): - self.write('context.eval_ctx, ') - elif getattr(self.environment.finalize, - 'environmentfunction', False): - self.write('environment, ') - close += 1 - self.visit(argument, frame) - self.write(')' * close + ', ') - self.outdent() - self.writeline(')') - - if outdent_later: - self.outdent() - - def visit_Assign(self, node, frame): - self.push_assign_tracking() - self.newline(node) - self.visit(node.target, frame) - self.write(' = ') - self.visit(node.node, frame) - self.pop_assign_tracking(frame) - - def visit_AssignBlock(self, node, frame): - self.push_assign_tracking() - block_frame = frame.inner() - # This is a special case. Since a set block always captures we - # will disable output checks. This way one can use set blocks - # toplevel even in extended templates. - block_frame.require_output_check = False - block_frame.symbols.analyze_node(node) - self.enter_frame(block_frame) - self.buffer(block_frame) - self.blockvisit(node.body, block_frame) - self.newline(node) - self.visit(node.target, frame) - self.write(' = (Markup if context.eval_ctx.autoescape ' - 'else identity)(') - if node.filter is not None: - self.visit_Filter(node.filter, block_frame) - else: - self.write('concat(%s)' % block_frame.buffer) - self.write(')') - self.pop_assign_tracking(frame) - self.leave_frame(block_frame) - - # -- Expression Visitors - - def visit_Name(self, node, frame): - if node.ctx == 'store' and frame.toplevel: - if self._assign_stack: - self._assign_stack[-1].add(node.name) - ref = frame.symbols.ref(node.name) - - # If we are looking up a variable we might have to deal with the - # case where it's undefined. We can skip that case if the load - # instruction indicates a parameter which are always defined. - if node.ctx == 'load': - load = frame.symbols.find_load(ref) - if not (load is not None and load[0] == VAR_LOAD_PARAMETER and \ - not self.parameter_is_undeclared(ref)): - self.write('(undefined(name=%r) if %s is missing else %s)' % - (node.name, ref, ref)) - return - - self.write(ref) - - def visit_NSRef(self, node, frame): - # NSRefs can only be used to store values; since they use the normal - # `foo.bar` notation they will be parsed as a normal attribute access - # when used anywhere but in a `set` context - ref = frame.symbols.ref(node.name) - self.writeline('if not isinstance(%s, Namespace):' % ref) - self.indent() - self.writeline('raise TemplateRuntimeError(%r)' % - 'cannot assign attribute on non-namespace object') - self.outdent() - self.writeline('%s[%r]' % (ref, node.attr)) - - def visit_Const(self, node, frame): - val = node.as_const(frame.eval_ctx) - if isinstance(val, float): - self.write(str(val)) - else: - self.write(repr(val)) - - def visit_TemplateData(self, node, frame): - try: - self.write(repr(node.as_const(frame.eval_ctx))) - except nodes.Impossible: - self.write('(Markup if context.eval_ctx.autoescape else identity)(%r)' - % node.data) - - def visit_Tuple(self, node, frame): - self.write('(') - idx = -1 - for idx, item in enumerate(node.items): - if idx: - self.write(', ') - self.visit(item, frame) - self.write(idx == 0 and ',)' or ')') - - def visit_List(self, node, frame): - self.write('[') - for idx, item in enumerate(node.items): - if idx: - self.write(', ') - self.visit(item, frame) - self.write(']') - - def visit_Dict(self, node, frame): - self.write('{') - for idx, item in enumerate(node.items): - if idx: - self.write(', ') - self.visit(item.key, frame) - self.write(': ') - self.visit(item.value, frame) - self.write('}') - - def binop(operator, interceptable=True): - @optimizeconst - def visitor(self, node, frame): - if self.environment.sandboxed and \ - operator in self.environment.intercepted_binops: - self.write('environment.call_binop(context, %r, ' % operator) - self.visit(node.left, frame) - self.write(', ') - self.visit(node.right, frame) - else: - self.write('(') - self.visit(node.left, frame) - self.write(' %s ' % operator) - self.visit(node.right, frame) - self.write(')') - return visitor - - def uaop(operator, interceptable=True): - @optimizeconst - def visitor(self, node, frame): - if self.environment.sandboxed and \ - operator in self.environment.intercepted_unops: - self.write('environment.call_unop(context, %r, ' % operator) - self.visit(node.node, frame) - else: - self.write('(' + operator) - self.visit(node.node, frame) - self.write(')') - return visitor - - visit_Add = binop('+') - visit_Sub = binop('-') - visit_Mul = binop('*') - visit_Div = binop('/') - visit_FloorDiv = binop('//') - visit_Pow = binop('**') - visit_Mod = binop('%') - visit_And = binop('and', interceptable=False) - visit_Or = binop('or', interceptable=False) - visit_Pos = uaop('+') - visit_Neg = uaop('-') - visit_Not = uaop('not ', interceptable=False) - del binop, uaop - - @optimizeconst - def visit_Concat(self, node, frame): - if frame.eval_ctx.volatile: - func_name = '(context.eval_ctx.volatile and' \ - ' markup_join or unicode_join)' - elif frame.eval_ctx.autoescape: - func_name = 'markup_join' - else: - func_name = 'unicode_join' - self.write('%s((' % func_name) - for arg in node.nodes: - self.visit(arg, frame) - self.write(', ') - self.write('))') - - @optimizeconst - def visit_Compare(self, node, frame): - self.visit(node.expr, frame) - for op in node.ops: - self.visit(op, frame) - - def visit_Operand(self, node, frame): - self.write(' %s ' % operators[node.op]) - self.visit(node.expr, frame) - - @optimizeconst - def visit_Getattr(self, node, frame): - self.write('environment.getattr(') - self.visit(node.node, frame) - self.write(', %r)' % node.attr) - - @optimizeconst - def visit_Getitem(self, node, frame): - # slices bypass the environment getitem method. - if isinstance(node.arg, nodes.Slice): - self.visit(node.node, frame) - self.write('[') - self.visit(node.arg, frame) - self.write(']') - else: - self.write('environment.getitem(') - self.visit(node.node, frame) - self.write(', ') - self.visit(node.arg, frame) - self.write(')') - - def visit_Slice(self, node, frame): - if node.start is not None: - self.visit(node.start, frame) - self.write(':') - if node.stop is not None: - self.visit(node.stop, frame) - if node.step is not None: - self.write(':') - self.visit(node.step, frame) - - @optimizeconst - def visit_Filter(self, node, frame): - if self.environment.is_async: - self.write('await auto_await(') - self.write(self.filters[node.name] + '(') - func = self.environment.filters.get(node.name) - if func is None: - self.fail('no filter named %r' % node.name, node.lineno) - if getattr(func, 'contextfilter', False): - self.write('context, ') - elif getattr(func, 'evalcontextfilter', False): - self.write('context.eval_ctx, ') - elif getattr(func, 'environmentfilter', False): - self.write('environment, ') - - # if the filter node is None we are inside a filter block - # and want to write to the current buffer - if node.node is not None: - self.visit(node.node, frame) - elif frame.eval_ctx.volatile: - self.write('(context.eval_ctx.autoescape and' - ' Markup(concat(%s)) or concat(%s))' % - (frame.buffer, frame.buffer)) - elif frame.eval_ctx.autoescape: - self.write('Markup(concat(%s))' % frame.buffer) - else: - self.write('concat(%s)' % frame.buffer) - self.signature(node, frame) - self.write(')') - if self.environment.is_async: - self.write(')') - - @optimizeconst - def visit_Test(self, node, frame): - self.write(self.tests[node.name] + '(') - if node.name not in self.environment.tests: - self.fail('no test named %r' % node.name, node.lineno) - self.visit(node.node, frame) - self.signature(node, frame) - self.write(')') - - @optimizeconst - def visit_CondExpr(self, node, frame): - def write_expr2(): - if node.expr2 is not None: - return self.visit(node.expr2, frame) - self.write('undefined(%r)' % ('the inline if-' - 'expression on %s evaluated to false and ' - 'no else section was defined.' % self.position(node))) - - self.write('(') - self.visit(node.expr1, frame) - self.write(' if ') - self.visit(node.test, frame) - self.write(' else ') - write_expr2() - self.write(')') - - @optimizeconst - def visit_Call(self, node, frame, forward_caller=False): - if self.environment.is_async: - self.write('await auto_await(') - if self.environment.sandboxed: - self.write('environment.call(context, ') - else: - self.write('context.call(') - self.visit(node.node, frame) - extra_kwargs = forward_caller and {'caller': 'caller'} or None - self.signature(node, frame, extra_kwargs) - self.write(')') - if self.environment.is_async: - self.write(')') - - def visit_Keyword(self, node, frame): - self.write(node.key + '=') - self.visit(node.value, frame) - - # -- Unused nodes for extensions - - def visit_MarkSafe(self, node, frame): - self.write('Markup(') - self.visit(node.expr, frame) - self.write(')') - - def visit_MarkSafeIfAutoescape(self, node, frame): - self.write('(context.eval_ctx.autoescape and Markup or identity)(') - self.visit(node.expr, frame) - self.write(')') - - def visit_EnvironmentAttribute(self, node, frame): - self.write('environment.' + node.name) - - def visit_ExtensionAttribute(self, node, frame): - self.write('environment.extensions[%r].%s' % (node.identifier, node.name)) - - def visit_ImportedName(self, node, frame): - self.write(self.import_aliases[node.importname]) - - def visit_InternalName(self, node, frame): - self.write(node.name) - - def visit_ContextReference(self, node, frame): - self.write('context') - - def visit_Continue(self, node, frame): - self.writeline('continue', node) - - def visit_Break(self, node, frame): - self.writeline('break', node) - - def visit_Scope(self, node, frame): - scope_frame = frame.inner() - scope_frame.symbols.analyze_node(node) - self.enter_frame(scope_frame) - self.blockvisit(node.body, scope_frame) - self.leave_frame(scope_frame) - - def visit_OverlayScope(self, node, frame): - ctx = self.temporary_identifier() - self.writeline('%s = %s' % (ctx, self.derive_context(frame))) - self.writeline('%s.vars = ' % ctx) - self.visit(node.context, frame) - self.push_context_reference(ctx) - - scope_frame = frame.inner(isolated=True) - scope_frame.symbols.analyze_node(node) - self.enter_frame(scope_frame) - self.blockvisit(node.body, scope_frame) - self.leave_frame(scope_frame) - self.pop_context_reference() - - def visit_EvalContextModifier(self, node, frame): - for keyword in node.options: - self.writeline('context.eval_ctx.%s = ' % keyword.key) - self.visit(keyword.value, frame) - try: - val = keyword.value.as_const(frame.eval_ctx) - except nodes.Impossible: - frame.eval_ctx.volatile = True - else: - setattr(frame.eval_ctx, keyword.key, val) - - def visit_ScopedEvalContextModifier(self, node, frame): - old_ctx_name = self.temporary_identifier() - saved_ctx = frame.eval_ctx.save() - self.writeline('%s = context.eval_ctx.save()' % old_ctx_name) - self.visit_EvalContextModifier(node, frame) - for child in node.body: - self.visit(child, frame) - frame.eval_ctx.revert(saved_ctx) - self.writeline('context.eval_ctx.revert(%s)' % old_ctx_name) diff --git a/package/bin/da_ess_contentupdate/jinja2/constants.py b/package/bin/da_ess_contentupdate/jinja2/constants.py deleted file mode 100644 index 11efd1ed15..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/constants.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja.constants - ~~~~~~~~~~~~~~~ - - Various constants. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" - - -#: list of lorem ipsum words used by the lipsum() helper function -LOREM_IPSUM_WORDS = u'''\ -a ac accumsan ad adipiscing aenean aliquam aliquet amet ante aptent arcu at -auctor augue bibendum blandit class commodo condimentum congue consectetuer -consequat conubia convallis cras cubilia cum curabitur curae cursus dapibus -diam dictum dictumst dignissim dis dolor donec dui duis egestas eget eleifend -elementum elit enim erat eros est et etiam eu euismod facilisi facilisis fames -faucibus felis fermentum feugiat fringilla fusce gravida habitant habitasse hac -hendrerit hymenaeos iaculis id imperdiet in inceptos integer interdum ipsum -justo lacinia lacus laoreet lectus leo libero ligula litora lobortis lorem -luctus maecenas magna magnis malesuada massa mattis mauris metus mi molestie -mollis montes morbi mus nam nascetur natoque nec neque netus nibh nisi nisl non -nonummy nostra nulla nullam nunc odio orci ornare parturient pede pellentesque -penatibus per pharetra phasellus placerat platea porta porttitor posuere -potenti praesent pretium primis proin pulvinar purus quam quis quisque rhoncus -ridiculus risus rutrum sagittis sapien scelerisque sed sem semper senectus sit -sociis sociosqu sodales sollicitudin suscipit suspendisse taciti tellus tempor -tempus tincidunt torquent tortor tristique turpis ullamcorper ultrices -ultricies urna ut varius vehicula vel velit venenatis vestibulum vitae vivamus -viverra volutpat vulputate''' diff --git a/package/bin/da_ess_contentupdate/jinja2/debug.py b/package/bin/da_ess_contentupdate/jinja2/debug.py deleted file mode 100644 index d3c1a3a875..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/debug.py +++ /dev/null @@ -1,378 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.debug - ~~~~~~~~~~~~ - - Implements the debug interface for Jinja. This module does some pretty - ugly stuff with the Python traceback system in order to achieve tracebacks - with correct line numbers, locals and contents. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -import sys -import traceback -from types import TracebackType, CodeType -from jinja2.utils import missing, internal_code -from jinja2.exceptions import TemplateSyntaxError -from jinja2._compat import iteritems, reraise, PY2 - -# on pypy we can take advantage of transparent proxies -try: - from __pypy__ import tproxy -except ImportError: - tproxy = None - - -# how does the raise helper look like? -try: - exec("raise TypeError, 'foo'") -except SyntaxError: - raise_helper = 'raise __jinja_exception__[1]' -except TypeError: - raise_helper = 'raise __jinja_exception__[0], __jinja_exception__[1]' - - -class TracebackFrameProxy(object): - """Proxies a traceback frame.""" - - def __init__(self, tb): - self.tb = tb - self._tb_next = None - - @property - def tb_next(self): - return self._tb_next - - def set_next(self, next): - if tb_set_next is not None: - try: - tb_set_next(self.tb, next and next.tb or None) - except Exception: - # this function can fail due to all the hackery it does - # on various python implementations. We just catch errors - # down and ignore them if necessary. - pass - self._tb_next = next - - @property - def is_jinja_frame(self): - return '__jinja_template__' in self.tb.tb_frame.f_globals - - def __getattr__(self, name): - return getattr(self.tb, name) - - -def make_frame_proxy(frame): - proxy = TracebackFrameProxy(frame) - if tproxy is None: - return proxy - def operation_handler(operation, *args, **kwargs): - if operation in ('__getattribute__', '__getattr__'): - return getattr(proxy, args[0]) - elif operation == '__setattr__': - proxy.__setattr__(*args, **kwargs) - else: - return getattr(proxy, operation)(*args, **kwargs) - return tproxy(TracebackType, operation_handler) - - -class ProcessedTraceback(object): - """Holds a Jinja preprocessed traceback for printing or reraising.""" - - def __init__(self, exc_type, exc_value, frames): - assert frames, 'no frames for this traceback?' - self.exc_type = exc_type - self.exc_value = exc_value - self.frames = frames - - # newly concatenate the frames (which are proxies) - prev_tb = None - for tb in self.frames: - if prev_tb is not None: - prev_tb.set_next(tb) - prev_tb = tb - prev_tb.set_next(None) - - def render_as_text(self, limit=None): - """Return a string with the traceback.""" - lines = traceback.format_exception(self.exc_type, self.exc_value, - self.frames[0], limit=limit) - return ''.join(lines).rstrip() - - def render_as_html(self, full=False): - """Return a unicode string with the traceback as rendered HTML.""" - from jinja2.debugrenderer import render_traceback - return u'%s\n\n' % ( - render_traceback(self, full=full), - self.render_as_text().decode('utf-8', 'replace') - ) - - @property - def is_template_syntax_error(self): - """`True` if this is a template syntax error.""" - return isinstance(self.exc_value, TemplateSyntaxError) - - @property - def exc_info(self): - """Exception info tuple with a proxy around the frame objects.""" - return self.exc_type, self.exc_value, self.frames[0] - - @property - def standard_exc_info(self): - """Standard python exc_info for re-raising""" - tb = self.frames[0] - # the frame will be an actual traceback (or transparent proxy) if - # we are on pypy or a python implementation with support for tproxy - if type(tb) is not TracebackType: - tb = tb.tb - return self.exc_type, self.exc_value, tb - - -def make_traceback(exc_info, source_hint=None): - """Creates a processed traceback object from the exc_info.""" - exc_type, exc_value, tb = exc_info - if isinstance(exc_value, TemplateSyntaxError): - exc_info = translate_syntax_error(exc_value, source_hint) - initial_skip = 0 - else: - initial_skip = 1 - return translate_exception(exc_info, initial_skip) - - -def translate_syntax_error(error, source=None): - """Rewrites a syntax error to please traceback systems.""" - error.source = source - error.translated = True - exc_info = (error.__class__, error, None) - filename = error.filename - if filename is None: - filename = '' - return fake_exc_info(exc_info, filename, error.lineno) - - -def translate_exception(exc_info, initial_skip=0): - """If passed an exc_info it will automatically rewrite the exceptions - all the way down to the correct line numbers and frames. - """ - tb = exc_info[2] - frames = [] - - # skip some internal frames if wanted - for x in range(initial_skip): - if tb is not None: - tb = tb.tb_next - initial_tb = tb - - while tb is not None: - # skip frames decorated with @internalcode. These are internal - # calls we can't avoid and that are useless in template debugging - # output. - if tb.tb_frame.f_code in internal_code: - tb = tb.tb_next - continue - - # save a reference to the next frame if we override the current - # one with a faked one. - next = tb.tb_next - - # fake template exceptions - template = tb.tb_frame.f_globals.get('__jinja_template__') - if template is not None: - lineno = template.get_corresponding_lineno(tb.tb_lineno) - tb = fake_exc_info(exc_info[:2] + (tb,), template.filename, - lineno)[2] - - frames.append(make_frame_proxy(tb)) - tb = next - - # if we don't have any exceptions in the frames left, we have to - # reraise it unchanged. - # XXX: can we backup here? when could this happen? - if not frames: - reraise(exc_info[0], exc_info[1], exc_info[2]) - - return ProcessedTraceback(exc_info[0], exc_info[1], frames) - - -def get_jinja_locals(real_locals): - ctx = real_locals.get('context') - if ctx: - locals = ctx.get_all().copy() - else: - locals = {} - - local_overrides = {} - - for name, value in iteritems(real_locals): - if not name.startswith('l_') or value is missing: - continue - try: - _, depth, name = name.split('_', 2) - depth = int(depth) - except ValueError: - continue - cur_depth = local_overrides.get(name, (-1,))[0] - if cur_depth < depth: - local_overrides[name] = (depth, value) - - for name, (_, value) in iteritems(local_overrides): - if value is missing: - locals.pop(name, None) - else: - locals[name] = value - - return locals - - -def fake_exc_info(exc_info, filename, lineno): - """Helper for `translate_exception`.""" - exc_type, exc_value, tb = exc_info - - # figure the real context out - if tb is not None: - locals = get_jinja_locals(tb.tb_frame.f_locals) - - # if there is a local called __jinja_exception__, we get - # rid of it to not break the debug functionality. - locals.pop('__jinja_exception__', None) - else: - locals = {} - - # assamble fake globals we need - globals = { - '__name__': filename, - '__file__': filename, - '__jinja_exception__': exc_info[:2], - - # we don't want to keep the reference to the template around - # to not cause circular dependencies, but we mark it as Jinja - # frame for the ProcessedTraceback - '__jinja_template__': None - } - - # and fake the exception - code = compile('\n' * (lineno - 1) + raise_helper, filename, 'exec') - - # if it's possible, change the name of the code. This won't work - # on some python environments such as google appengine - try: - if tb is None: - location = 'template' - else: - function = tb.tb_frame.f_code.co_name - if function == 'root': - location = 'top-level template code' - elif function.startswith('block_'): - location = 'block "%s"' % function[6:] - else: - location = 'template' - - if PY2: - code = CodeType(0, code.co_nlocals, code.co_stacksize, - code.co_flags, code.co_code, code.co_consts, - code.co_names, code.co_varnames, filename, - location, code.co_firstlineno, - code.co_lnotab, (), ()) - else: - code = CodeType(0, code.co_kwonlyargcount, - code.co_nlocals, code.co_stacksize, - code.co_flags, code.co_code, code.co_consts, - code.co_names, code.co_varnames, filename, - location, code.co_firstlineno, - code.co_lnotab, (), ()) - except Exception as e: - pass - - # execute the code and catch the new traceback - try: - exec(code, globals, locals) - except: - exc_info = sys.exc_info() - new_tb = exc_info[2].tb_next - - # return without this frame - return exc_info[:2] + (new_tb,) - - -def _init_ugly_crap(): - """This function implements a few ugly things so that we can patch the - traceback objects. The function returned allows resetting `tb_next` on - any python traceback object. Do not attempt to use this on non cpython - interpreters - """ - import ctypes - from types import TracebackType - - if PY2: - # figure out size of _Py_ssize_t for Python 2: - if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): - _Py_ssize_t = ctypes.c_int64 - else: - _Py_ssize_t = ctypes.c_int - else: - # platform ssize_t on Python 3 - _Py_ssize_t = ctypes.c_ssize_t - - # regular python - class _PyObject(ctypes.Structure): - pass - _PyObject._fields_ = [ - ('ob_refcnt', _Py_ssize_t), - ('ob_type', ctypes.POINTER(_PyObject)) - ] - - # python with trace - if hasattr(sys, 'getobjects'): - class _PyObject(ctypes.Structure): - pass - _PyObject._fields_ = [ - ('_ob_next', ctypes.POINTER(_PyObject)), - ('_ob_prev', ctypes.POINTER(_PyObject)), - ('ob_refcnt', _Py_ssize_t), - ('ob_type', ctypes.POINTER(_PyObject)) - ] - - class _Traceback(_PyObject): - pass - _Traceback._fields_ = [ - ('tb_next', ctypes.POINTER(_Traceback)), - ('tb_frame', ctypes.POINTER(_PyObject)), - ('tb_lasti', ctypes.c_int), - ('tb_lineno', ctypes.c_int) - ] - - def tb_set_next(tb, next): - """Set the tb_next attribute of a traceback object.""" - if not (isinstance(tb, TracebackType) and - (next is None or isinstance(next, TracebackType))): - raise TypeError('tb_set_next arguments must be traceback objects') - obj = _Traceback.from_address(id(tb)) - if tb.tb_next is not None: - old = _Traceback.from_address(id(tb.tb_next)) - old.ob_refcnt -= 1 - if next is None: - obj.tb_next = ctypes.POINTER(_Traceback)() - else: - next = _Traceback.from_address(id(next)) - next.ob_refcnt += 1 - obj.tb_next = ctypes.pointer(next) - - return tb_set_next - - -# try to get a tb_set_next implementation if we don't have transparent -# proxies. -tb_set_next = None -if tproxy is None: - # traceback.tb_next can be modified since CPython 3.7 - if sys.version_info >= (3, 7): - def tb_set_next(tb, next): - tb.tb_next = next - else: - # On Python 3.6 and older, use ctypes - try: - tb_set_next = _init_ugly_crap() - except Exception: - pass -del _init_ugly_crap diff --git a/package/bin/da_ess_contentupdate/jinja2/defaults.py b/package/bin/da_ess_contentupdate/jinja2/defaults.py deleted file mode 100644 index 7c93dec0ae..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/defaults.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.defaults - ~~~~~~~~~~~~~~~ - - Jinja default filters and tags. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -from jinja2._compat import range_type -from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner, Namespace - - -# defaults for the parser / lexer -BLOCK_START_STRING = '{%' -BLOCK_END_STRING = '%}' -VARIABLE_START_STRING = '{{' -VARIABLE_END_STRING = '}}' -COMMENT_START_STRING = '{#' -COMMENT_END_STRING = '#}' -LINE_STATEMENT_PREFIX = None -LINE_COMMENT_PREFIX = None -TRIM_BLOCKS = False -LSTRIP_BLOCKS = False -NEWLINE_SEQUENCE = '\n' -KEEP_TRAILING_NEWLINE = False - - -# default filters, tests and namespace -from jinja2.filters import FILTERS as DEFAULT_FILTERS -from jinja2.tests import TESTS as DEFAULT_TESTS -DEFAULT_NAMESPACE = { - 'range': range_type, - 'dict': dict, - 'lipsum': generate_lorem_ipsum, - 'cycler': Cycler, - 'joiner': Joiner, - 'namespace': Namespace -} - - -# default policies -DEFAULT_POLICIES = { - 'compiler.ascii_str': True, - 'urlize.rel': 'noopener', - 'urlize.target': None, - 'truncate.leeway': 5, - 'json.dumps_function': None, - 'json.dumps_kwargs': {'sort_keys': True}, - 'ext.i18n.trimmed': False, -} - - -# export all constants -__all__ = tuple(x for x in locals().keys() if x.isupper()) diff --git a/package/bin/da_ess_contentupdate/jinja2/environment.py b/package/bin/da_ess_contentupdate/jinja2/environment.py deleted file mode 100644 index 549d9afab4..0000000000 --- a/package/bin/da_ess_contentupdate/jinja2/environment.py +++ /dev/null @@ -1,1276 +0,0 @@ -# -*- coding: utf-8 -*- -""" - jinja2.environment - ~~~~~~~~~~~~~~~~~~ - - Provides a class that holds runtime and parsing time options. - - :copyright: (c) 2017 by the Jinja Team. - :license: BSD, see LICENSE for more details. -""" -import os -import sys -import weakref -from functools import reduce, partial -from jinja2 import nodes -from jinja2.defaults import BLOCK_START_STRING, \ - BLOCK_END_STRING, VARIABLE_START_STRING, VARIABLE_END_STRING, \ - COMMENT_START_STRING, COMMENT_END_STRING, LINE_STATEMENT_PREFIX, \ - LINE_COMMENT_PREFIX, TRIM_BLOCKS, NEWLINE_SEQUENCE, \ - DEFAULT_FILTERS, DEFAULT_TESTS, DEFAULT_NAMESPACE, \ - DEFAULT_POLICIES, KEEP_TRAILING_NEWLINE, LSTRIP_BLOCKS -from jinja2.lexer import get_lexer, TokenStream -from jinja2.parser import Parser -from jinja2.nodes import EvalContext -from jinja2.compiler import generate, CodeGenerator -from jinja2.runtime import Undefined, new_context, Context -from jinja2.exceptions import TemplateSyntaxError, TemplateNotFound, \ - TemplatesNotFound, TemplateRuntimeError -from jinja2.utils import import_string, LRUCache, Markup, missing, \ - concat, consume, internalcode, have_async_gen -from jinja2._compat import imap, ifilter, string_types, iteritems, \ - text_type, reraise, implements_iterator, implements_to_string, \ - encode_filename, PY2, PYPY - - -# for direct template usage we have up to ten living environments -_spontaneous_environments = LRUCache(10) - -# the function to create jinja traceback objects. This is dynamically -# imported on the first exception in the exception handler. -_make_traceback = None - - -def get_spontaneous_environment(*args): - """Return a new spontaneous environment. A spontaneous environment is an - unnamed and unaccessible (in theory) environment that is used for - templates generated from a string and not from the file system. - """ - try: - env = _spontaneous_environments.get(args) - except TypeError: - return Environment(*args) - if env is not None: - return env - _spontaneous_environments[args] = env = Environment(*args) - env.shared = True - return env - - -def create_cache(size): - """Return the cache class for the given size.""" - if size == 0: - return None - if size < 0: - return {} - return LRUCache(size) - - -def copy_cache(cache): - """Create an empty copy of the given cache.""" - if cache is None: - return None - elif type(cache) is dict: - return {} - return LRUCache(cache.capacity) - - -def load_extensions(environment, extensions): - """Load the extensions from the list and bind it to the environment. - Returns a dict of instantiated environments. - """ - result = {} - for extension in extensions: - if isinstance(extension, string_types): - extension = import_string(extension) - result[extension.identifier] = extension(environment) - return result - - -def fail_for_missing_callable(string, name): - msg = string % name - if isinstance(name, Undefined): - try: - name._fail_with_undefined_error() - except Exception as e: - msg = '%s (%s; did you forget to quote the callable name?)' % (msg, e) - raise TemplateRuntimeError(msg) - - -def _environment_sanity_check(environment): - """Perform a sanity check on the environment.""" - assert issubclass(environment.undefined, Undefined), 'undefined must ' \ - 'be a subclass of undefined because filters depend on it.' - assert environment.block_start_string != \ - environment.variable_start_string != \ - environment.comment_start_string, 'block, variable and comment ' \ - 'start strings must be different' - assert environment.newline_sequence in ('\r', '\r\n', '\n'), \ - 'newline_sequence set to unknown line ending string.' - return environment - - -class Environment(object): - r"""The core component of Jinja is the `Environment`. It contains - important shared variables like configuration, filters, tests, - globals and others. Instances of this class may be modified if - they are not shared and if no template was loaded so far. - Modifications on environments after the first template was loaded - will lead to surprising effects and undefined behavior. - - Here are the possible initialization parameters: - - `block_start_string` - The string marking the beginning of a block. Defaults to ``'{%'``. - - `block_end_string` - The string marking the end of a block. Defaults to ``'%}'``. - - `variable_start_string` - The string marking the beginning of a print statement. - Defaults to ``'{{'``. - - `variable_end_string` - The string marking the end of a print statement. Defaults to - ``'}}'``. - - `comment_start_string` - The string marking the beginning of a comment. Defaults to ``'{#'``. - - `comment_end_string` - The string marking the end of a comment. Defaults to ``'#}'``. - - `line_statement_prefix` - If given and a string, this will be used as prefix for line based - statements. See also :ref:`line-statements`. - - `line_comment_prefix` - If given and a string, this will be used as prefix for line based - comments. See also :ref:`line-statements`. - - .. versionadded:: 2.2 - - `trim_blocks` - If this is set to ``True`` the first newline after a block is - removed (block, not variable tag!). Defaults to `False`. - - `lstrip_blocks` - If this is set to ``True`` leading spaces and tabs are stripped - from the start of a line to a block. Defaults to `False`. - - `newline_sequence` - The sequence that starts a newline. Must be one of ``'\r'``, - ``'\n'`` or ``'\r\n'``. The default is ``'\n'`` which is a - useful default for Linux and OS X systems as well as web - applications. - - `keep_trailing_newline` - Preserve the trailing newline when rendering templates. - The default is ``False``, which causes a single newline, - if present, to be stripped from the end of the template. - - .. versionadded:: 2.7 - - `extensions` - List of Jinja extensions to use. This can either be import paths - as strings or extension classes. For more information have a - look at :ref:`the extensions documentation `. - - `optimized` - should the optimizer be enabled? Default is ``True``. - - `undefined` - :class:`Undefined` or a subclass of it that is used to represent - undefined values in the template. - - `finalize` - A callable that can be used to process the result of a variable - expression before it is output. For example one can convert - ``None`` implicitly into an empty string here. - - `autoescape` - If set to ``True`` the XML/HTML autoescaping feature is enabled by - default. For more details about autoescaping see - :class:`~jinja2.utils.Markup`. As of Jinja 2.4 this can also - be a callable that is passed the template name and has to - return ``True`` or ``False`` depending on autoescape should be - enabled by default. - - .. versionchanged:: 2.4 - `autoescape` can now be a function - - `loader` - The template loader for this environment. - - `cache_size` - The size of the cache. Per default this is ``400`` which means - that if more than 400 templates are loaded the loader will clean - out the least recently used template. If the cache size is set to - ``0`` templates are recompiled all the time, if the cache size is - ``-1`` the cache will not be cleaned. - - .. versionchanged:: 2.8 - The cache size was increased to 400 from a low 50. - - `auto_reload` - Some loaders load templates from locations where the template - sources may change (ie: file system or database). If - ``auto_reload`` is set to ``True`` (default) every time a template is - requested the loader checks if the source changed and if yes, it - will reload the template. For higher performance it's possible to - disable that. - - `bytecode_cache` - If set to a bytecode cache object, this object will provide a - cache for the internal Jinja bytecode so that templates don't - have to be parsed if they were not changed. - - See :ref:`bytecode-cache` for more information. - - `enable_async` - If set to true this enables async template execution which allows - you to take advantage of newer Python features. This requires - Python 3.6 or later. - """ - - #: if this environment is sandboxed. Modifying this variable won't make - #: the environment sandboxed though. For a real sandboxed environment - #: have a look at jinja2.sandbox. This flag alone controls the code - #: generation by the compiler. - sandboxed = False - - #: True if the environment is just an overlay - overlayed = False - - #: the environment this environment is linked to if it is an overlay - linked_to = None - - #: shared environments have this set to `True`. A shared environment - #: must not be modified - shared = False - - #: these are currently EXPERIMENTAL undocumented features. - exception_handler = None - exception_formatter = None - - #: the class that is used for code generation. See - #: :class:`~jinja2.compiler.CodeGenerator` for more information. - code_generator_class = CodeGenerator - - #: the context class thatis used for templates. See - #: :class:`~jinja2.runtime.Context` for more information. - context_class = Context - - def __init__(self, - block_start_string=BLOCK_START_STRING, - block_end_string=BLOCK_END_STRING, - variable_start_string=VARIABLE_START_STRING, - variable_end_string=VARIABLE_END_STRING, - comment_start_string=COMMENT_START_STRING, - comment_end_string=COMMENT_END_STRING, - line_statement_prefix=LINE_STATEMENT_PREFIX, - line_comment_prefix=LINE_COMMENT_PREFIX, - trim_blocks=TRIM_BLOCKS, - lstrip_blocks=LSTRIP_BLOCKS, - newline_sequence=NEWLINE_SEQUENCE, - keep_trailing_newline=KEEP_TRAILING_NEWLINE, - extensions=(), - optimized=True, - undefined=Undefined, - finalize=None, - autoescape=False, - loader=None, - cache_size=400, - auto_reload=True, - bytecode_cache=None, - enable_async=False): - # !!Important notice!! - # The constructor accepts quite a few arguments that should be - # passed by keyword rather than position. However it's important to - # not change the order of arguments because it's used at least - # internally in those cases: - # - spontaneous environments (i18n extension and Template) - # - unittests - # If parameter changes are required only add parameters at the end - # and don't change the arguments (or the defaults!) of the arguments - # existing already. - - # lexer / parser information - self.block_start_string = block_start_string - self.block_end_string = block_end_string - self.variable_start_string = variable_start_string - self.variable_end_string = variable_end_string - self.comment_start_string = comment_start_string - self.comment_end_string = comment_end_string - self.line_statement_prefix = line_statement_prefix - self.line_comment_prefix = line_comment_prefix - self.trim_blocks = trim_blocks - self.lstrip_blocks = lstrip_blocks - self.newline_sequence = newline_sequence - self.keep_trailing_newline = keep_trailing_newline - - # runtime information - self.undefined = undefined - self.optimized = optimized - self.finalize = finalize - self.autoescape = autoescape - - # defaults - self.filters = DEFAULT_FILTERS.copy() - self.tests = DEFAULT_TESTS.copy() - self.globals = DEFAULT_NAMESPACE.copy() - - # set the loader provided - self.loader = loader - self.cache = create_cache(cache_size) - self.bytecode_cache = bytecode_cache - self.auto_reload = auto_reload - - # configurable policies - self.policies = DEFAULT_POLICIES.copy() - - # load extensions - self.extensions = load_extensions(self, extensions) - - self.enable_async = enable_async - self.is_async = self.enable_async and have_async_gen - - _environment_sanity_check(self) - - def add_extension(self, extension): - """Adds an extension after the environment was created. - - .. versionadded:: 2.5 - """ - self.extensions.update(load_extensions(self, [extension])) - - def extend(self, **attributes): - """Add the items to the instance of the environment if they do not exist - yet. This is used by :ref:`extensions ` to register - callbacks and configuration values without breaking inheritance. - """ - for key, value in iteritems(attributes): - if not hasattr(self, key): - setattr(self, key, value) - - def overlay(self, block_start_string=missing, block_end_string=missing, - variable_start_string=missing, variable_end_string=missing, - comment_start_string=missing, comment_end_string=missing, - line_statement_prefix=missing, line_comment_prefix=missing, - trim_blocks=missing, lstrip_blocks=missing, - extensions=missing, optimized=missing, - undefined=missing, finalize=missing, autoescape=missing, - loader=missing, cache_size=missing, auto_reload=missing, - bytecode_cache=missing): - """Create a new overlay environment that shares all the data with the - current environment except for cache and the overridden attributes. - Extensions cannot be removed for an overlayed environment. An overlayed - environment automatically gets all the extensions of the environment it - is linked to plus optional extra extensions. - - Creating overlays should happen after the initial environment was set - up completely. Not all attributes are truly linked, some are just - copied over so modifications on the original environment may not shine - through. - """ - args = dict(locals()) - del args['self'], args['cache_size'], args['extensions'] - - rv = object.__new__(self.__class__) - rv.__dict__.update(self.__dict__) - rv.overlayed = True - rv.linked_to = self - - for key, value in iteritems(args): - if value is not missing: - setattr(rv, key, value) - - if cache_size is not missing: - rv.cache = create_cache(cache_size) - else: - rv.cache = copy_cache(self.cache) - - rv.extensions = {} - for key, value in iteritems(self.extensions): - rv.extensions[key] = value.bind(rv) - if extensions is not missing: - rv.extensions.update(load_extensions(rv, extensions)) - - return _environment_sanity_check(rv) - - lexer = property(get_lexer, doc="The lexer for this environment.") - - def iter_extensions(self): - """Iterates over the extensions by priority.""" - return iter(sorted(self.extensions.values(), - key=lambda x: x.priority)) - - def getitem(self, obj, argument): - """Get an item or attribute of an object but prefer the item.""" - try: - return obj[argument] - except (AttributeError, TypeError, LookupError): - if isinstance(argument, string_types): - try: - attr = str(argument) - except Exception: - pass - else: - try: - return getattr(obj, attr) - except AttributeError: - pass - return self.undefined(obj=obj, name=argument) - - def getattr(self, obj, attribute): - """Get an item or attribute of an object but prefer the attribute. - Unlike :meth:`getitem` the attribute *must* be a bytestring. - """ - try: - return getattr(obj, attribute) - except AttributeError: - pass - try: - return obj[attribute] - except (TypeError, LookupError, AttributeError): - return self.undefined(obj=obj, name=attribute) - - def call_filter(self, name, value, args=None, kwargs=None, - context=None, eval_ctx=None): - """Invokes a filter on a value the same way the compiler does it. - - Note that on Python 3 this might return a coroutine in case the - filter is running from an environment in async mode and the filter - supports async execution. It's your responsibility to await this - if needed. - - .. versionadded:: 2.7 - """ - func = self.filters.get(name) - if func is None: - fail_for_missing_callable('no filter named %r', name) - args = [value] + list(args or ()) - if getattr(func, 'contextfilter', False): - if context is None: - raise TemplateRuntimeError('Attempted to invoke context ' - 'filter without context') - args.insert(0, context) - elif getattr(func, 'evalcontextfilter', False): - if eval_ctx is None: - if context is not None: - eval_ctx = context.eval_ctx - else: - eval_ctx = EvalContext(self) - args.insert(0, eval_ctx) - elif getattr(func, 'environmentfilter', False): - args.insert(0, self) - return func(*args, **(kwargs or {})) - - def call_test(self, name, value, args=None, kwargs=None): - """Invokes a test on a value the same way the compiler does it. - - .. versionadded:: 2.7 - """ - func = self.tests.get(name) - if func is None: - fail_for_missing_callable('no test named %r', name) - return func(value, *(args or ()), **(kwargs or {})) - - @internalcode - def parse(self, source, name=None, filename=None): - """Parse the sourcecode and return the abstract syntax tree. This - tree of nodes is used by the compiler to convert the template into - executable source- or bytecode. This is useful for debugging or to - extract information from templates. - - If you are :ref:`developing Jinja2 extensions ` - this gives you a good overview of the node tree generated. - """ - try: - return self._parse(source, name, filename) - except TemplateSyntaxError: - exc_info = sys.exc_info() - self.handle_exception(exc_info, source_hint=source) - - def _parse(self, source, name, filename): - """Internal parsing function used by `parse` and `compile`.""" - return Parser(self, source, name, encode_filename(filename)).parse() - - def lex(self, source, name=None, filename=None): - """Lex the given sourcecode and return a generator that yields - tokens as tuples in the form ``(lineno, token_type, value)``. - This can be useful for :ref:`extension development ` - and debugging templates. - - This does not perform preprocessing. If you want the preprocessing - of the extensions to be applied you have to filter source through - the :meth:`preprocess` method. - """ - source = text_type(source) - try: - return self.lexer.tokeniter(source, name, filename) - except TemplateSyntaxError: - exc_info = sys.exc_info() - self.handle_exception(exc_info, source_hint=source) - - def preprocess(self, source, name=None, filename=None): - """Preprocesses the source with all extensions. This is automatically - called for all parsing and compiling methods but *not* for :meth:`lex` - because there you usually only want the actual source tokenized. - """ - return reduce(lambda s, e: e.preprocess(s, name, filename), - self.iter_extensions(), text_type(source)) - - def _tokenize(self, source, name, filename=None, state=None): - """Called by the parser to do the preprocessing and filtering - for all the extensions. Returns a :class:`~jinja2.lexer.TokenStream`. - """ - source = self.preprocess(source, name, filename) - stream = self.lexer.tokenize(source, name, filename, state) - for ext in self.iter_extensions(): - stream = ext.filter_stream(stream) - if not isinstance(stream, TokenStream): - stream = TokenStream(stream, name, filename) - return stream - - def _generate(self, source, name, filename, defer_init=False): - """Internal hook that can be overridden to hook a different generate - method in. - - .. versionadded:: 2.5 - """ - return generate(source, self, name, filename, defer_init=defer_init, - optimized=self.optimized) - - def _compile(self, source, filename): - """Internal hook that can be overridden to hook a different compile - method in. - - .. versionadded:: 2.5 - """ - return compile(source, filename, 'exec') - - @internalcode - def compile(self, source, name=None, filename=None, raw=False, - defer_init=False): - """Compile a node or template source code. The `name` parameter is - the load name of the template after it was joined using - :meth:`join_path` if necessary, not the filename on the file system. - the `filename` parameter is the estimated filename of the template on - the file system. If the template came from a database or memory this - can be omitted. - - The return value of this method is a python code object. If the `raw` - parameter is `True` the return value will be a string with python - code equivalent to the bytecode returned otherwise. This method is - mainly used internally. - - `defer_init` is use internally to aid the module code generator. This - causes the generated code to be able to import without the global - environment variable to be set. - - .. versionadded:: 2.4 - `defer_init` parameter added. - """ - source_hint = None - try: - if isinstance(source, string_types): - source_hint = source - source = self._parse(source, name, filename) - source = self._generate(source, name, filename, - defer_init=defer_init) - if raw: - return source - if filename is None: - filename = '