summaryrefslogtreecommitdiff
path: root/lib/verify-tofu.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-10 15:29:59 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-10 15:29:59 +0200
commit0aefb946f6b25a617412316b05affcd7811da2be (patch)
tree88f982dd137969e6c88bc2ba531b007166d1452b /lib/verify-tofu.c
parent22b7f3ff35b09a99bd337e85c679e01d5554fe20 (diff)
downloadgnutls-0aefb946f6b25a617412316b05affcd7811da2be.tar.gz
export x509_crt_to_raw_pubkey() in x509/common.h and prefixed s/get_extension with _gnutls
Diffstat (limited to 'lib/verify-tofu.c')
-rw-r--r--lib/verify-tofu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c
index 70b8439981..c692343529 100644
--- a/lib/verify-tofu.c
+++ b/lib/verify-tofu.c
@@ -43,8 +43,6 @@ struct gnutls_tdb_int {
static int raw_pubkey_to_base64(const gnutls_datum_t * raw,
gnutls_datum_t * b64);
-static int x509_crt_to_raw_pubkey(const gnutls_datum_t * cert,
- gnutls_datum_t * rpubkey);
static int pgp_crt_to_raw_pubkey(const gnutls_datum_t * cert,
gnutls_datum_t * rpubkey);
static int verify_pubkey(const char *file, const char *host,
@@ -384,8 +382,9 @@ static int raw_pubkey_to_base64(const gnutls_datum_t * raw,
return 0;
}
-static int x509_crt_to_raw_pubkey(const gnutls_datum_t * cert,
- gnutls_datum_t * rpubkey)
+/* Converts an X.509 certificate to subjectPublicKeyInfo */
+int x509_crt_to_raw_pubkey(const gnutls_datum_t * cert,
+ gnutls_datum_t * rpubkey)
{
gnutls_x509_crt_t crt = NULL;
gnutls_pubkey_t pubkey = NULL;