VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/crypto/x509/v3_single_use.c@ 108358

最後變更 在這個檔案從108358是 108206,由 vboxsync 提交於 6 週 前

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.4 KB
 
1/*
2 * Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include <stdio.h>
11#include "internal/cryptlib.h"
12#include <openssl/asn1.h>
13#include <openssl/asn1t.h>
14#include <openssl/x509v3.h>
15#include "ext_dat.h"
16
17static int i2r_SINGLE_USE(X509V3_EXT_METHOD *method,
18 void *su, BIO *out,
19 int indent)
20{
21 return 1;
22}
23
24static void *r2i_SINGLE_USE(X509V3_EXT_METHOD *method,
25 X509V3_CTX *ctx, const char *value)
26{
27 return ASN1_NULL_new();
28}
29
30static char *i2s_SINGLE_USE(const X509V3_EXT_METHOD *method, void *val)
31{
32 return OPENSSL_strdup("NULL");
33}
34
35static void *s2i_SINGLE_USE(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, const char *str)
36{
37 return ASN1_NULL_new();
38}
39
40/*
41 * The singleUse X.509v3 extension is defined in ITU Recommendation X.509
42 * (2019), Section 17.1.2.5. See: https://www.itu.int/rec/T-REC-X.509-201910-I/en.
43 */
44const X509V3_EXT_METHOD ossl_v3_single_use = {
45 NID_single_use, 0, ASN1_ITEM_ref(ASN1_NULL),
46 0, 0, 0, 0,
47 (X509V3_EXT_I2S)i2s_SINGLE_USE,
48 (X509V3_EXT_S2I)s2i_SINGLE_USE,
49 0, 0,
50 (X509V3_EXT_I2R)i2r_SINGLE_USE,
51 (X509V3_EXT_R2I)r2i_SINGLE_USE,
52 NULL
53};
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette