Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cryptography
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
OpenVMS
Python
Modules
cryptography
Commits
0a7f1c0932d7
Commit
0a7f1c0932d7
authored
5 years ago
by
Steven Pitman
Browse files
Options
Downloads
Patches
Plain Diff
Add support for IBM z/OS (#5304)
parent
49f846ce8d3a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/_cffi_src/build_openssl.py
+4
-1
4 additions, 1 deletion
src/_cffi_src/build_openssl.py
src/_cffi_src/openssl/callbacks.py
+17
-1
17 additions, 1 deletion
src/_cffi_src/openssl/callbacks.py
src/_cffi_src/openssl/src/osrandom_engine.h
+3
-1
3 additions, 1 deletion
src/_cffi_src/openssl/src/osrandom_engine.h
with
24 additions
and
3 deletions
src/_cffi_src/build_openssl.py
+
4
−
1
View file @
0a7f1c09
...
...
@@ -40,6 +40,9 @@
# -lpthread required due to usage of pthread an potential
# existance of a static part containing e.g. pthread_atfork
# (https://github.com/pyca/cryptography/issues/5084)
if
sys
.
platform
==
'
zos
'
:
return
[
"
ssl
"
,
"
crypto
"
]
else
:
return
[
"
ssl
"
,
"
crypto
"
,
"
pthread
"
]
...
...
This diff is collapsed.
Click to expand it.
src/_cffi_src/openssl/callbacks.py
+
17
−
1
View file @
0a7f1c09
...
...
@@ -20,6 +20,10 @@
#include <stdlib.h>
#include <pthread.h>
#endif
#ifdef __MVS__
#include <errno.h>
#endif
"""
TYPES
=
"""
...
...
@@ -66,7 +70,19 @@
perror(
"
Fatal error in callback initialization:
"
#call);
\
abort();
\
}
#ifdef __MVS__
/* When pthread_mutex_init is called more than once on the same mutex,
on z/OS this throws an EBUSY error.
*/
#define ASSERT_STATUS_INIT(call)
\
if ((call) != 0 && errno != EBUSY) {
\
perror(
"
Fatal error in callback initialization:
"
#call);
\
abort();
\
}
#else
#define ASSERT_STATUS_INIT ASSERT_STATUS
#endif
static inline void cryptography_mutex_init(Cryptography_mutex *mutex) {
#if !defined(pthread_mutexattr_default)
# define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL)
#endif
...
...
@@ -69,8 +85,8 @@
static inline void cryptography_mutex_init(Cryptography_mutex *mutex) {
#if !defined(pthread_mutexattr_default)
# define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL)
#endif
ASSERT_STATUS(pthread_mutex_init(mutex, pthread_mutexattr_default));
ASSERT_STATUS
_INIT
(pthread_mutex_init(mutex, pthread_mutexattr_default));
}
static inline void cryptography_mutex_lock(Cryptography_mutex *mutex) {
ASSERT_STATUS(pthread_mutex_lock(mutex));
...
...
This diff is collapsed.
Click to expand it.
src/_cffi_src/openssl/src/osrandom_engine.h
+
3
−
1
View file @
0a7f1c09
...
...
@@ -6,4 +6,5 @@
#include
<fcntl.h>
#include
<unistd.h>
/* for defined(BSD) */
#ifndef __MVS__
#include
<sys/param.h>
...
...
@@ -9,4 +10,5 @@
#include
<sys/param.h>
#endif
#ifdef BSD
/* for SYS_getentropy */
...
...
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