Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SSE-IoT-Encryption
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Fuhrmann
SSE-IoT-Encryption
Commits
9a37d074
Commit
9a37d074
authored
6 months ago
by
Dominik Fuhrmann
Browse files
Options
Downloads
Patches
Plain Diff
added test script
parent
e83163ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/test.py
+36
-0
36 additions, 0 deletions
scripts/test.py
with
36 additions
and
0 deletions
scripts/test.py
0 → 100644
+
36
−
0
View file @
9a37d074
import
sys
try
:
from
wolfssl.ssl
import
WolfSSLContext
,
SSL_METHOD_TLSv1_2
# Nur diese Imports!
print
(
"
wolfssl erfolgreich importiert!
"
)
print
(
f
"
Python Version:
{
sys
.
version
}
"
)
print
(
f
"
wolfssl Version:
{
wolfssl
.
__version__
if
hasattr
(
wolfssl
,
'
__version__
'
)
else
'
Version unbekannt
'
}
"
)
#Versuche die Version auszugeben
context
=
WolfSSLContext
(
SSL_METHOD_TLSv1_2
)
#Test ob die Initialisierung funktioniert
print
(
"
Context erfolgreich erstellt
"
)
except
ImportError
as
e
:
print
(
f
"
ImportError:
{
e
}
"
)
print
(
f
"
Python Version:
{
sys
.
version
}
"
)
import
pkg_resources
installed_packages
=
pkg_resources
.
working_set
installed_packages_list
=
sorted
([
"
%s==%s
"
%
(
i
.
key
,
i
.
version
)
for
i
in
installed_packages
])
print
(
"
Installierte Pakete:
"
)
for
package
in
installed_packages_list
:
print
(
package
)
except
AttributeError
as
e
:
print
(
f
"
AttributeError:
{
e
}
"
)
print
(
f
"
Python Version:
{
sys
.
version
}
"
)
import
pkg_resources
installed_packages
=
pkg_resources
.
working_set
installed_packages_list
=
sorted
([
"
%s==%s
"
%
(
i
.
key
,
i
.
version
)
for
i
in
installed_packages
])
print
(
"
Installierte Pakete:
"
)
for
package
in
installed_packages_list
:
print
(
package
)
except
Exception
as
e
:
#Fange alle anderen Exceptions
print
(
f
"
Sonstiger Fehler:
{
e
}
"
)
print
(
f
"
Python Version:
{
sys
.
version
}
"
)
import
pkg_resources
installed_packages
=
pkg_resources
.
working_set
installed_packages_list
=
sorted
([
"
%s==%s
"
%
(
i
.
key
,
i
.
version
)
for
i
in
installed_packages
])
print
(
"
Installierte Pakete:
"
)
for
package
in
installed_packages_list
:
print
(
package
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment