Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
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
The Tor Project
Core
Tor
Commits
67e66898
Commit
67e66898
authored
8 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
For testing: add a tor_x509_cert_dup().
parent
88c2a6b9
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
src/common/tortls.c
+7
-0
7 additions, 0 deletions
src/common/tortls.c
src/common/tortls.h
+1
-0
1 addition, 0 deletions
src/common/tortls.h
with
8 additions
and
0 deletions
src/common/tortls.c
+
7
−
0
View file @
67e66898
...
...
@@ -683,6 +683,13 @@ MOCK_IMPL(STATIC tor_x509_cert_t *,
return
cert
;
}
/** Return a copy of <b>cert</b> */
tor_x509_cert_t
*
tor_x509_cert_dup
(
const
tor_x509_cert_t
*
cert
)
{
return
tor_x509_cert_new
(
X509_dup
(
cert
->
cert
));
}
/** Read a DER-encoded X509 cert, of length exactly <b>certificate_len</b>,
* from a <b>certificate</b>. Return a newly allocated tor_x509_cert_t on
* success and NULL on failure. */
...
...
This diff is collapsed.
Click to expand it.
src/common/tortls.h
+
1
−
0
View file @
67e66898
...
...
@@ -176,6 +176,7 @@ extern uint64_t total_bytes_written_by_tls;
#endif
/* endif TORTLS_PRIVATE */
tor_x509_cert_t
*
tor_x509_cert_dup
(
const
tor_x509_cert_t
*
cert
);
const
char
*
tor_tls_err_to_string
(
int
err
);
void
tor_tls_get_state_description
(
tor_tls_t
*
tls
,
char
*
buf
,
size_t
sz
);
...
...
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