Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP OpenSSL
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 OpenSSL
Commits
7236e3c8
Commit
7236e3c8
authored
9 years ago
by
Dr. Stephen Henson
Browse files
Options
Downloads
Patches
Plain Diff
Add ECDSA_SIG accessor.
Reviewed-by:
Richard Levitte
<
levitte@openssl.org
>
parent
ef5b2ba6
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
crypto/ec/ec_asn1.c
+8
-2
8 additions, 2 deletions
crypto/ec/ec_asn1.c
include/openssl/ec.h
+8
-0
8 additions, 0 deletions
include/openssl/ec.h
with
16 additions
and
2 deletions
crypto/ec/ec_asn1.c
+
8
−
2
View file @
7236e3c8
...
...
@@ -1303,8 +1303,6 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
return
buf_len
;
}
#include
<openssl/ecdsa.h>
ASN1_SEQUENCE
(
ECDSA_SIG
)
=
{
ASN1_SIMPLE
(
ECDSA_SIG
,
r
,
CBIGNUM
),
ASN1_SIMPLE
(
ECDSA_SIG
,
s
,
CBIGNUM
)
...
...
@@ -1313,3 +1311,11 @@ ASN1_SEQUENCE(ECDSA_SIG) = {
DECLARE_ASN1_FUNCTIONS_const
(
ECDSA_SIG
)
DECLARE_ASN1_ENCODE_FUNCTIONS_const
(
ECDSA_SIG
,
ECDSA_SIG
)
IMPLEMENT_ASN1_FUNCTIONS_const
(
ECDSA_SIG
)
void
ECDSA_SIG_get0
(
BIGNUM
**
pr
,
BIGNUM
**
ps
,
ECDSA_SIG
*
sig
)
{
if
(
pr
)
*
pr
=
sig
->
r
;
if
(
ps
)
*
ps
=
sig
->
s
;
}
This diff is collapsed.
Click to expand it.
include/openssl/ec.h
+
8
−
0
View file @
7236e3c8
...
...
@@ -1028,6 +1028,14 @@ int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
*/
ECDSA_SIG
*
d2i_ECDSA_SIG
(
ECDSA_SIG
**
sig
,
const
unsigned
char
**
pp
,
long
len
);
/** Accessor for r and s fields of ECDSA_SIG
* \param sig pointer to ECDSA_SIG pointer
* \param pr pointer to BIGNUM pointer for r (may be NULL)
* \param ps pointer to BIGNUM pointer for s (may be NULL)
*/
void
ECDSA_SIG_get0
(
BIGNUM
**
pr
,
BIGNUM
**
ps
,
ECDSA_SIG
*
sig
);
# define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)
# ifndef __cplusplus
...
...
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