Source
10
10
* modify it under the terms of the GNU Lesser General Public License
11
11
* as published by the Free Software Foundation; either version 2.1
12
12
* of the licence, or (at your option) any later version.
13
13
*/
14
14
#define _GNU_SOURCE
15
15
#include <stdio.h>
16
16
#include <stdlib.h>
17
17
#include <stdint.h>
18
18
#include <stdbool.h>
19
19
#include <string.h>
20
-
#include <getopt.h>
21
20
#include <err.h>
22
-
#include <arpa/inet.h>
23
21
#include <openssl/bio.h>
24
-
#include <openssl/evp.h>
25
22
#include <openssl/pem.h>
26
-
#include <openssl/pkcs7.h>
27
23
#include <openssl/err.h>
28
24
#include <openssl/engine.h>
29
25
30
26
#define PKEY_ID_PKCS7 2
31
27
32
28
static __attribute__((noreturn))
33
29
void format(void)
34
30
{
35
31
fprintf(stderr,
36
32
"Usage: scripts/extract-cert <source> <dest>\n");