SSL catch-22 on using custom FreeBSD package repository

Found myself in a Catch-22 situation. Since our package server is using SSL certicates by Let’s Encrypt which are not trusted by default in FreeBSD base system, causing error:

# pkg install vim-console
Updating custom repository catalogue…

Certificate verification failed for /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3

34404218008:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/s3_clnt.c:1269:
...
Unable to update repository custom

Error updating repositories!

Normally the solution would be to install security/ca_root_nns. How-ever this fails since certificate cannot be trusted. To overwrite temporary disable the SSL validation ones to ensure the package get installed:

# env SSL_NO_VERIFY_PEER=1 pkg install ca_root_nss

One last remark; make sure the connection itself is not tampered while installing this package. Since you briefly expose a vector of attack, due to the disabling of the SSL verification. To circumvent this; 1) manually download the package 2) scp the package and 3) install it.

Resize VirtualBox (virtual) hard-disk at Ubuntu guest

My virtual filesystem used by my Ubuntu guest, required for building OpenEmbedded and OpenWRT was in need of some extra disk space. This sequence of commands will ensure the virtual hard-disk will be resized from 50GB to 90GB.

This will first require to resize the virtual hard-disk. After this action the partition table will need to be altered to match the new size. Next the filesystem should be updated to match the newly created partition size.

NOTE OF WARNING: Mangling with partitions and filesystems on-the-fly is dangerous. Make sure to backup your files on your guest system if required.

#
# First and foremost ensure Virtual host has been shutdown. Not suspended!
#
# Find VM UUID
host$ VBoxManage list vms
"FreeBSD 10.3" {3f37f0e4-b783-4022-bd34-faf5fc569cda}
"FreeBSD 9.3" {cfe9d640-5bd4-469d-82c1-096d7402d56c}
"FreeBSD 9.0" {fbc06586-c021-48bd-86b2-ea8cafc915c7}
"FreeBSD 11.2" {379e670a-cac8-420f-88cf-68e0fac98ecd}
"u1804 (Ubuntu 18.04)" {73056625-55b6-49a9-8ddc-f6f851f784af}
"FreeBSD 12.0" {7f5c67c2-3740-4b51-8a21-b9e2355b8ae6}
#
# Find HD UUID to resize
host$ VBoxManage showvminfo 73056625-55b6-49a9-8ddc-f6f851f784af | grep SATA
Storage Controller Name (1):            SATA
SATA (0, 0): /home/rick/VirtualBox VMs/u1804 (Ubuntu 18.04)/Ubuntu 18.04.vdi (UUID: 8fcc5023-6ebe-4fcb-9908-d8e7689d6b3a)
#
# Resize disk to 90GB (92160MB)
host$ VBoxManage modifymedium disk 8fcc5023-6ebe-4fcb-9908-d8e7689d6b3a --resize 92160
 0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
# 
# <start VM and login via ssh/console>
#
# Verify current disk size
guest$ df -h /
/dev/sda2        49G   45G  1.9G  96% /
#
# Repartition drive with larger partition size
guest$ sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 83886080 blocks) or continue with the current setting? 
Fix/Ignore? Fix                                                           
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 96.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  53.7GB  53.7GB  ext4

(parted) resizepart 2                                                     
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
Yes/No? Yes
End?  [53.7GB]? 96.6GB                                                    
(parted) print                                                            
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 96.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  96.6GB  96.6GB  ext4

(parted) quit
Information: You may need to update /etc/fstab.
#
# Regrow filesystem
guest$ sudo resize2fs /dev/sda2 
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sda2 is mounted on /; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 12
The filesystem on /dev/sda2 is now 23583472 (4k) blocks long.
#
# Check newly grown filesystem
guest$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        89G   45G   40G  53% /