Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
028a408d
Commit
028a408d
authored
10 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
axtls: define curlssl_random using axTLS's PRNG
parent
3d5be801
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/vtls/axtls.c
+17
-0
17 additions, 0 deletions
lib/vtls/axtls.c
lib/vtls/axtls.h
+4
-0
4 additions, 0 deletions
lib/vtls/axtls.h
with
21 additions
and
0 deletions
lib/vtls/axtls.c
+
17
−
0
View file @
028a408d
...
...
@@ -664,4 +664,21 @@ size_t Curl_axtls_version(char *buffer, size_t size)
return
snprintf
(
buffer
,
size
,
"axTLS/%s"
,
ssl_version
());
}
int
Curl_axtls_random
(
struct
SessionHandle
*
data
,
unsigned
char
*
entropy
,
size_t
length
)
{
static
bool
ssl_seeded
=
FALSE
;
(
void
)
data
;
if
(
!
ssl_seeded
)
{
ssl_seeded
=
TRUE
;
/* Initialize the seed if not already done. This call is not exactly thread
* safe (and neither is the ssl_seeded check), but the worst effect of a
* race condition is that some global resources will leak. */
RNG_initialize
();
}
get_random
(
length
,
entropy
);
return
0
;
}
#endif
/* USE_AXTLS */
This diff is collapsed.
Click to expand it.
lib/vtls/axtls.h
+
4
−
0
View file @
028a408d
...
...
@@ -46,6 +46,9 @@ void Curl_axtls_session_free(void *ptr);
size_t
Curl_axtls_version
(
char
*
buffer
,
size_t
size
);
int
Curl_axtls_shutdown
(
struct
connectdata
*
conn
,
int
sockindex
);
int
Curl_axtls_check_cxn
(
struct
connectdata
*
conn
);
int
Curl_axtls_random
(
struct
SessionHandle
*
data
,
unsigned
char
*
entropy
,
size_t
length
);
/* API setup for axTLS */
#define curlssl_init Curl_axtls_init
...
...
@@ -62,6 +65,7 @@ int Curl_axtls_check_cxn(struct connectdata *conn);
#define curlssl_version Curl_axtls_version
#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
#define curlssl_data_pending(x,y) (x=x, y=y, 0)
#define curlssl_random(x,y,z) Curl_axtls_random(x,y,z)
#endif
/* USE_AXTLS */
#endif
/* HEADER_CURL_AXTLS_H */
...
...
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