#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
-#include <printf.h>
+#include <stdio.h>
#include "x509.h"
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
*/
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;
*/
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.
*