• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

refvalue / cpp-essence / 12077050342

29 Nov 2024 12:34AM UTC coverage: 37.774% (+0.06%) from 37.717%
12077050342

push

github

refvalue
New feature: aggregate_error::throw_nested, a more concise, clear version

0 of 43 new or added lines in 4 files covered. (0.0%)

1001 of 2650 relevant lines covered (37.77%)

42.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/crypto/params/rsa_keygen_param.cpp
1
/*
2
 * Copyright (c) 2024 The RefValue Project
3
 *
4
 * Permission is hereby granted, free of charge, to any person obtaining a copy
5
 * of this software and associated documentation files (the "Software"), to deal
6
 * in the Software without restriction, including without limitation the rights
7
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
 * copies of the Software, and to permit persons to whom the Software is
9
 * furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in
12
 * all copies or substantial portions of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
 * THE SOFTWARE.
21
 */
22

23
#include "crypto/params/rsa_keygen_param.hpp"
24

25
#include "../util.hpp"
26
#include "char8_t_remediation.hpp"
27
#include "error_extensions.hpp"
28
#include "exception.hpp"
29

30
#include <exception>
31

32
namespace essence::crypto {
NEW
33
    void* rsa_keygen_param::generate_key_blob() const try {
×
NEW
34
        return evp_pkey_q_keygen(U8("RSA"), key_bits).release();
×
NEW
35
    } catch (const std::exception&) {
×
NEW
36
        aggregate_error::throw_nested(source_code_aware_runtime_error{U8("Key Bits"), key_bits});
×
37
    }
38
} // namespace essence::crypto
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc