Skip to content

Commit

Permalink
remove ossl_ symbol (open-quantum-safe#124)
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Ventura <felipe.ventura@entrust.com>
  • Loading branch information
baentsch authored and feventura committed Mar 13, 2024
1 parent 9ff51ba commit 105b985
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions oqsprov/oqs_endecoder_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#include <openssl/core.h>
#include <openssl/buffer.h>
//#include "internal/asn1.h"
//#include "prov/bio.h"
#include <openssl/bio.h>
#include "oqs_endecoder_local.h"

Expand Down Expand Up @@ -86,22 +84,3 @@ void oqs_prov_free_key(const OSSL_DISPATCH *fns, void *key)
kmgmt_free(key);
}

// "crypto internal" function: TCB: OK to use???
extern int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb);

int ossl_read_der(PROV_OQS_CTX *provctx, OSSL_CORE_BIO *cin, unsigned char **data,
long *len)
{
BUF_MEM *mem = NULL;
BIO *in = BIO_new_from_core_bio(PROV_OQS_LIBCTX_OF(provctx), cin);
// permissible/sensible to use this internal function?
int ok = (asn1_d2i_read_bio(in, &mem) >= 0);

if (ok) {
*data = (unsigned char *)mem->data;
*len = (long)mem->length;
OPENSSL_free(mem);
}
BIO_free(in);
return ok;
}

0 comments on commit 105b985

Please sign in to comment.