addin get_keyid() method

This commit is contained in:
Andreas Steffen
2007-02-24 00:33:48 +00:00
parent 182d20e94e
commit 0cdec3baa5
2 changed files with 18 additions and 1 deletions
+10 -1
View File
@@ -24,7 +24,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <printf.h>
#include <stdio.h>
#include "x509.h"
@@ -988,6 +988,14 @@ static chunk_t get_subjectKeyID(const private_x509_t *this)
return this->subjectKeyID;
}
/**
* Implements x509_t.get_keyid
*/
static chunk_t get_keyid(const private_x509_t *this)
{
return this->public_key->get_keyid(this->public_key);
}
/**
* Implements x509_t.get_issuer
*/
@@ -1213,6 +1221,7 @@ x509_t *x509_create_from_chunk(chunk_t chunk)
this->public.get_public_key = (rsa_public_key_t* (*) (const x509_t*))get_public_key;
this->public.get_serialNumber = (chunk_t (*) (const x509_t*))get_serialNumber;
this->public.get_subjectKeyID = (chunk_t (*) (const x509_t*))get_subjectKeyID;
this->public.get_keyid = (chunk_t (*) (const x509_t*))get_keyid;
this->public.get_issuer = (identification_t* (*) (const x509_t*))get_issuer;
this->public.get_subject = (identification_t* (*) (const x509_t*))get_subject;
this->public.set_until = (void (*) (x509_t*,time_t))set_until;
+8
View File
@@ -110,6 +110,14 @@ struct x509_t {
*/
chunk_t (*get_subjectKeyID) (const x509_t *this);
/**
* @brief Get keyid from the certificate's public key.
*
* @param this calling object
* @return keyid
*/
chunk_t (*get_keyid) (const x509_t *this);
/**
* @brief Get the certificate issuer's ID.
*