certificates: Retrieve serial numbers in canonical form
The x509 plugin retrieves serial numbers with two's complement encoding whereas the openssl plugin partially returns them without leading zeroes. Serial numbers in X.509 certificates, X.509 CRL, X.509 attribute certificates, OCSP Requests and OCSP responses are now returned in canonical form without prepended zero octets.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Tobias Brunner
|
||||
* Copyright (C) 2008-2009 Martin Willi
|
||||
* Copyright (C) 2007-2015 Andreas Steffen
|
||||
* Copyright (C) 2007-2022 Andreas Steffen
|
||||
* Copyright (C) 2003 Christoph Gysin, Simon Zwahlen
|
||||
*
|
||||
* Copyright (C) secunet Security Networks AG
|
||||
@@ -370,7 +370,7 @@ static bool parse_singleResponse(private_x509_ocsp_response_t *this,
|
||||
response->issuerKeyHash = object;
|
||||
break;
|
||||
case SINGLE_RESPONSE_SERIAL_NUMBER:
|
||||
response->serialNumber = object;
|
||||
response->serialNumber = chunk_skip_zero(object);
|
||||
break;
|
||||
case SINGLE_RESPONSE_CERT_STATUS_GOOD:
|
||||
response->status = VALIDATION_GOOD;
|
||||
|
||||
Reference in New Issue
Block a user