Skip to content

Commit 5b742b6

Browse files
committed
Add functions to read signature and key id from compressed struct
1 parent 7b86882 commit 5b742b6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ECP256Certificate.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* INCLUDE
1313
******************************************************************************/
1414

15+
/* This is neededn for memmem */
1516
#define _GNU_SOURCE
1617
#include <string.h>
1718
#include "ECP256Certificate.h"

src/ECP256Certificate.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ class ECP256Certificate {
8484
inline byte* subjectCommonNameBytes() { return (byte*)_subjectData.commonName.begin(); }
8585
inline int subjectCommonNameLenght() {return _subjectData.commonName.length(); }
8686

87+
inline const byte* authorityKeyIdentifierBytes() { return _compressedCert.slot.two.values.authorityKeyId; }
88+
inline const byte* signatureBytes() { return _compressedCert.slot.one.values.signature; }
89+
8790
/* Build CSR */
8891
int buildCSR();
8992
int signCSR(byte signature[]);

0 commit comments

Comments
 (0)