Skip to content

Commit

Permalink
add ECPKParameters_print as no-op (aws#1686)
Browse files Browse the repository at this point in the history
Ruby consumes  `ECPKParameters_print`. The entire function is a bit
convoluted and not really beneficial unless you're using custom curves.
We can expose this as a no-op until there's a more proper use case for
this.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
  • Loading branch information
samuel40791765 authored Jul 11, 2024
1 parent 6056999 commit a0e8da9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto/ec_extra/ec_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
#include <openssl/mem.h>
#include <openssl/nid.h>

#include "../fipsmodule/ec/internal.h"
#include "../bytestring/internal.h"
#include "../fipsmodule/ec/internal.h"
#include "../internal.h"


Expand Down Expand Up @@ -690,3 +690,6 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, const BIGNUM *bn,
return ret;
}

int ECPKParameters_print(BIO *bio, const EC_GROUP *group, int offset) {
return 1;
}
3 changes: 3 additions & 0 deletions include/openssl/ec.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ OPENSSL_EXPORT OPENSSL_DEPRECATED unsigned char *EC_GROUP_get0_seed(
OPENSSL_EXPORT OPENSSL_DEPRECATED size_t
EC_GROUP_get_seed_len(const EC_GROUP *group);

// ECPKParameters_print prints nothing and returns 1.
OPENSSL_EXPORT OPENSSL_DEPRECATED int ECPKParameters_print(
BIO *bio, const EC_GROUP *group, int offset);

// EC_METHOD No-ops [Deprecated].
//
Expand Down

0 comments on commit a0e8da9

Please sign in to comment.