Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
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
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
Benjamin J. Thompson
Tor
Commits
38212d2e
Commit
38212d2e
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Remove a redundant function.
parent
0f971d7c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/crypt_ops/crypto_rsa_openssl.c
+6
-16
6 additions, 16 deletions
src/lib/crypt_ops/crypto_rsa_openssl.c
with
6 additions
and
16 deletions
src/lib/crypt_ops/crypto_rsa_openssl.c
+
6
−
16
View file @
38212d2e
...
...
@@ -41,11 +41,10 @@ struct crypto_pk_t
RSA
*
key
;
/**< The key itself */
};
/** used internally: quicly validate a crypto_pk_t object as a private key.
* Return 1 iff the public key is valid, 0 if obviously invalid.
*/
static
int
crypto_pk_private_ok
(
const
crypto_pk_t
*
k
)
/** Return true iff <b>key</b> contains the private-key portion of the RSA
* key. */
int
crypto_pk_key_is_private
(
const
crypto_pk_t
*
k
)
{
#ifdef OPENSSL_1_1_API
if
(
!
k
||
!
k
->
key
)
...
...
@@ -371,7 +370,7 @@ crypto_pk_write_private_key_to_filename(crypto_pk_t *env,
char
*
s
;
int
r
;
tor_assert
(
crypto_pk_private
_ok
(
env
));
tor_assert
(
crypto_pk_
key_is_
private
(
env
));
if
(
!
(
bio
=
BIO_new
(
BIO_s_mem
())))
return
-
1
;
...
...
@@ -407,15 +406,6 @@ crypto_pk_check_key(crypto_pk_t *env)
return
r
;
}
/** Return true iff <b>key</b> contains the private-key portion of the RSA
* key. */
int
crypto_pk_key_is_private
(
const
crypto_pk_t
*
key
)
{
tor_assert
(
key
);
return
crypto_pk_private_ok
(
key
);
}
/** Return true iff <b>env</b> contains a public key whose public exponent
* equals 65537.
*/
...
...
@@ -545,7 +535,7 @@ crypto_pk_copy_full(crypto_pk_t *env)
tor_assert
(
env
);
tor_assert
(
env
->
key
);
if
(
crypto_pk_private
_ok
(
env
))
{
if
(
crypto_pk_
key_is_
private
(
env
))
{
new_key
=
RSAPrivateKey_dup
(
env
->
key
);
privatekey
=
1
;
}
else
{
...
...
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